> From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]] > > From: Piroumian Konstantin [mailto:[EMAIL PROTECTED]] > > > > I think that this discussion that happened at Forrest > project will help you > > a little: http://marc.theaimsgroup.com/?t=102404381400002&r=1&w=2 > > or you can simply do something (don't know exactly): > > <map:act type="lang"> > <!-- suppose it returns {lang} variable --> > > <map:generate src="dir/file_{lang}.xml"/> > ... > </map:act>
Note, that type="lang" action was used for the LangSelect action which is deprecated in 2.0.3 and were removed from the 2.1. The correct version will look like: <map:act type="locale"> <!-- suppose it returns {locale, lang, country and variant } variables --> <map:generate src="dir/file_{locale}.xml"/> ... </map:act> > > You can even check existence of the file with > ResourceExistAction and return default language if > translation is not available. You can check if the translation is present in this order: locale = lang_country_variant (e.g. de_AT_EURO) lang_country (e.g. en_US) lang (e.g. en) This is how i18n trasformer looks for dictionary files. Maybe something like an new LocalizedFileAction action would be more convenient for this task. It can check for the existence of required resource then return the first matched one or the default file name, e.g.: <map:act type="localized-file"> <!-- returns {file} variable --> <map:generate src="dir/{file}.xml"/> ... </map:act> Konstantin > > > Vadim > > > > -- > > Konstantin Piroumian > > [EMAIL PROTECTED] > > > > > > > -----Original Message----- > > > From: JИrТme Iffrig [mailto:[EMAIL PROTECTED]] > > > Sent: Monday, July 22, 2002 4:36 PM > > > To: [EMAIL PROTECTED] > > > Subject: == I18N question == > > > > > > > > > Hi, > > > > > > I am new with Cocoon, so I am not sure this is the rigth > > > channel to ask question, please accept my apology if it is > > > not. > > > I would like to internationalize my Site - NOT the site > > > itself, but rather its CONTAINT. e.g. I would like to, let > > > say, localise the HELP page of my site in 4 langages and > > > rely on Cocoon for the localisation (depending on the > > > preferences of the visitor). Which means that on one hand I > > > would like to have the XML files for the content in > > > different languages (I would like to have one XML file per > > > language for administration ease), and on the other hand, I > > > would like to have my Cocoon style file. At the end all the > > > localised content files would be parsed according to the > > > style file to he coherent in the styles with different > > > languages. > > > Have anyone of you done this before? I can see tutorials on > > > how to create dictionaries and how to replace strings > > > (Cocoon official website), but nothing realy clear > > > regarding my question. > > > > > > Thanks for your time. > > > Jé- > > > ______________________________________________________ > > > Boîte aux lettres - Caramail - http://www.caramail.com > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>