Sounds good. Seems to work like ResourceBundles. I'll definitely try it
tonight.

Thanx
Judith

> Hello Judith,
> In the latest developer snapshot, Konstantin introduced a new format for 
> the dictionary files. They now look as follows:
> 
> <catalogue xml:lang="en">
>     <message key="some key">Translated Text</message>
> </catalogue>
> 
> The declaration of the transformer changed as follows:
> 
> <map:transformer     name="i18n"      
> src="org.apache.cocoon.transformation.I18nTransformer">
>     <catalogue-name>name of your dictionary files (e.g. 
> messages)</catalogue-name>
>     <catalogue-location>name of a cocoon sub directory, where your 
> dictionary files reside (e.g. dictionary)</catalogue-location>
> </map:transformer>
> 
> The default language and available languages are implicitly taken from 
> the existing dictionary files. For me, messages.xml contains the default 
> language translation, messages_de contains the German translation and 
> messages_en contains the English texts.
> 
> The latest snapshot works for me, if I use the above format. There is 
> also a stylesheet convert.xsl in the latest distribution. This can be 
> used to convert your dictionary files from the old to the new format.
> 
> Hope this helps,
> Mario
> 
> 
> Judith Andres wrote:
> 
> >Hi,
> >
> >I'm trying to use the I18nTransformer from Konstantin Piroumian.
> >So far everything seemed to work ok but now I'm running into serious
> >problems.
> >
> >I noticed the following strange behaviour.
> >Although I configured the transforer correctly - at least I think so -
> >namely:
> >
> >  <map:transformer name="i18n"
> >src="org.apache.cocoon.transformation.I18nTransformer">
> >     <map:parameter name="default_lang" value="de"/>
> >      <map:parameter name="available_lang_1" value="de"/>
> >      <map:parameter name="available_lang_2" value="en"/>
> >   </map:transformer>
> >
> >it just ignores the given parameters and just uses whatever is in the
> >dictionary. That means, if there is the following entry in the dictionary
> >
> ><entry>
> >    <key>hello</key>
> >    <translation lang="es">hola</translation>
> >    <translation lang="de">hallo</translation>
> >    <translation lang="en">hello</translation>
> ></entry>
> >
> >the transformer will give back the Spanish translation when asked for it
> >with ?lang=es
> >It will do this even Spanish is not defined as an available language in
> the
> >sitemap. It will even consider Spanish as the default language even if it
> is
> >not defined in the sitemap at all.
> >
> >Another problem: for me it is absolutely mandatory to be able to use not
> >just language code but also country code. But something like de_DE or
> en_US
> >will be ignored by the transformer.
> >
> >Thanx
> >Judith
> >
> >
> >
> >
> >---------------------------------------------------------------------
> >Please check that your question has not already been answered in the
> >FAQ before posting. <http://xml.apache.org/cocoon/faqs.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/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to