Has anyone successfully created a FormsPublisher interface that could be "localized" for another langauge simply by configuration or branch location.I am exploring two options one using FormAPI and one using <inline />I would be interested in any feedback you may have.
I would really appreciate some input on this from someone. Interwoven?It is curious that the entire user interface of TeamSite changes language based on a users computer language code, however workflows and forms developed in the ways outlined by Interwoven provide no method of localization. I must me missing something here...
You'd have to be way more specific to get any meaningful help. Please note that OOTB Forms Publisher interfaceadheres to TS Server locale. The locale is normally set during installation. TS Server can not be run in multiple locales concurrently. So, the formal answer to your request is perhaps "No, it can not be done", not 100% anyway.That said, you yourself can code for some locale mix where Developer controlled DCT assets (Labels, Descriptions, CGI APIand whatnot) are rendered in the locale other than TS Server depending on your own recognition criteria. Once again, thatmay create Language mix within same DC Form. If that's acceptable, describe at least some details
If I were you, I would do neither <inline> nor FormAPI. Instead, I would code some sort of "DCT Preprocessor".This code one and the only purpose in life would be to take a DCT and inject desired collection of internal XMLentities into it, see sample below. This approach constraints are:1. Locale-dependent DCT 's string literals should all be coded as references2. There is a repository somewhere to supply Label/Value pairs to build XML Entities ( Flat Files, XMLs, dedicated DCRs, DB, _your_own_repository_format_here_ )You may even expose that *Preprocessor* to DCT developers via Custom Menu CGI Item, to be run against *checked* DCT with Locales drop-down, etc...[html]&itm_label_langauge; ...[/html]
Very intereting...some questions.....1). Would the preprocessor operate and modify a DCT such that it needed to be versioned (checked back into TeamSite). I'm really looking for something that can take an universal DCT and make it local before it loads. On the fly so to speak.2). Would an [inline/] be capable of injecting the entities? I think it could?
If I were you, I would do neither <inline> nor FormAPI. [...]
1. You'd have to work it out. Depending on how you architect the whole thing, the DCT XML shared source can be set(for example) in some dedicated Branch, a peer perhaps to your *DCT Target* Branch. That will give you proper DCTsource versioning and so on. Alternatively you can modify DCTs "In Place" or maintain them outside of iw-store altogether.2. Don't think so, wrong logistics. Entity is a directive to the parser and parser should well, parse DCT beforeany TS Functionality takes place. That said, I never tried. After all, TS parses at least twice, it may work. Try it and let us all know.
Still the idea of having to create an entity for every label, option and description is a but daunting
[html]...[/html]
That's elegant and much better than my original suggestion! Seems practically an ideal in your case. I gave only a passing thought to the external(probably won't work here) and totally forgot about parameter Entities. As you noted, unless you keep it in the form of *ready to go* XML in the first place, you'd still have to generate it but it's true shared asset instead of replica's>>...I found a whole host of other uses for external entities...You and many others. It's standard XML. That stuff has been discussed on the Forum quite a few times, there are also KB Articles.For example, in some cases I use it instead of <inline> where the the call is *expensive* and the output is needed in numerous non-replicated DCT items
Thanks for pointing me in the right direction! Are there any best practices for creating and maintaining entities? Scopeing them correctly, naming conventions etc.. are there any links or sites you would recommend?
How timely,I just finished developing this using the inline mechanism (using TeamSite 6.7.1 SP 1, Windows 2003), but have some testing left to do. I've tried the FormAPI/AJAX method in the past, but always came against roadblocks that could be solved easier with perl before the page is built than with js after the page is built.At a high level, this is what I did;1) Identify and store what the user's language preference is as set in their browser, this required a language sniffing cgi inserted as a background image into custom.css.2) Place the contents of the target dct into a file (I called it a dct snippet).3) Replace the snippet with my inline command, which loads the dct snippet gets all the strings that I would want translated or localized (these are #text values for "label" and "description" nodes plus "label" attributes of "option" nodes in the xml), I store all my strings in a jrb using an "XPath"ish naming convention that aligns to my dct snippet.The advantages of this approach versus others that I have done/tried are;A) You still write the dct using xml, instead of doing a whole bunch of print statements in perl. It works in PreviewC) It happens before the page is loaded, so no FormAPI lagD) To support additional locales, I need only to add the corresponding .properties fileE) No requirement for cross browser scriptingF) It is also tied to authoring for multiple languages, so I can add additional authoring languages to my dct by adding locales (I can add French by adding "fr-ca" to the configuration).The only issue that I think may come in the testing is the handling of Tabs. I'll have to research this, but it is my understanding that Tabs only have name and no label attributes. Changing the name attribute changes the label, but I have yet to investigate how this impacts the data structure.This is the way I got it to work, and is by no means the only way, I've seen other developers in my group have limited success with FormAPI, but always getting stuck somewhere. The entities method looks good, but I've always had problems detecting the user's language preference (since this is stored in the browser and not in the vpath).