On 10.05.2004 21:55, Dean West wrote:
I have been tasked with internationalization for the company I work for, and
since we already use Cocoon in our current appliction - I am thinking that
the "I18n Transformer" should do the job?
I like the concept of the I18n Transformer because it seperates the
different langues into their own source XML documents... this SEEMS to be
way more efficient than having 1 xml source doc with a plethora of
"xml:lang" tags for each language translation.
Can anyone offer their expertise on this subject (best practices)? - it
just seems really heavy on the xml engine to have to parse huge xml files
(containing all language translations).
Yes, you should use multiple files. They offer as additional value the fallback from the language_country_variant to language_country to language to default if a key is missing in the more detailed variant. Did you read the documentation on I18nTransformer? I think it explains the details very well:
http://cocoon.apache.org/2.1/userdocs/transformers/i18n- transformer.html
The documentation on the wiki can probably not add much more, but the URL is: http://wiki.cocoondev.org/Wiki.jsp?page=I18NTransformer
You should be aware that the present i18n support in Cocoon (2.1.4) is missing one major i18n feature: whole-document i18n. The present features are geared towards database-driven sites where you need to translate table headings, menues, and other smaller pieces of texts as part of a generated site. If your site is document-heavy in the sense that you have largeish documents in several languages (each language in a separate file, as you describe it above), there presently is no way to select _documents_ (ie files) based on locale/language, at least I have not been able to find a way of doing it.
BUT: Upayavira has implemented an i18n-ed file selector which does proper fallbacks (lang_country_variant -> lang_country -> lang). I haven't tried it yet myself, but I believe it is available in the latest CVS versions. With it you can also easily select whole documents/files based on locale.
Sjur
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]