> From: Volker Schneider [mailto:[EMAIL PROTECTED]] > > Hi Konstantin, > > thank you for your reply. I already looked in this examples > before, but they > don't really help, because they are not using a locale > definition and they > do nothing else than I did. In the documentation I read > something about > "message catalog". Has this something to with the locale problem?
I couldn't find any locale problem in your problem. I saw only an old-style dictionary usage that has changed. Message catalog's are what you need. If you look into the i18n/translations directory then you'll find messages*.xml file there containing translations for several languages. > > Can you tell me something about the new dictionary syntax or > where I can > find it, so that I can continue? Mail archives don't help as well. Currently, the only place is the i18n samples directory. Here is the definition of i18n transformer: <map:transformers default="xslt"> <map:transformer name="i18n" logger="sitemap.transformer.i18n" src="org.apache.cocoon.transformation.I18nTransformer"> <!-- This is the base-name for your dictionary files --> <catalogue-name>messages</catalogue-name> <!-- This is the directory where your dictionary files are placed --> <catalogue-location>translations</catalogue-location> </map:transformer> </map:transformers> If you need more control over locale selection then take a look at LocaleAction and use it in your pipelines before i18n transformer like this: <map:match pattern="*.xml"> <map:act type="locale-action" /> <map:generate src="{1}.xml"/> <map:transform type="i18n"/> <map:transform src="simple.xsl"/> <map:serialize/> </map:match> Hope this helps. Konstantin > > Regards > - Volker - > > -----Original Message----- > From: Piroumian Konstantin [mailto:[EMAIL PROTECTED]] > Sent: Freitag, 12. April 2002 11:23 > To: '[EMAIL PROTECTED]' > Subject: RE: Unable to locate resource: messages (C2) > > > > From: Volker Schneider [mailto:[EMAIL PROTECTED]] > > > > Hi colleagues, > > > > I need the i18n transformer and tried a simple sample: > > > > first.xml: > > > > <route xmlns:i18n="http://apache.org/cocoon/i18n/2.0"> > > <start> > > <i18n:translate> > > <i18n:text>Startpunkt</i18n:text> > > </i18n:translate> > > </start> > > It's enough to use <i18n:text>Startpunkt</i18n:text>. > <i18n:translate > is > used when you need param substitution. > > > > > <ziel>Endpunkt:</ziel> > > <abschnitte> > > </abschnitte> > > </route> > > > > dictionary.xml: > > > > <?xml version="1.0" encoding="UTF-8" ?> > > <translations> > > <entry> > > <key>Startpunkt</key> > > <translation lang="en">Starting point</translation> > > <translation lang="de">Startpunkt</translation> > > </entry> > > </translations> > > Dictionary syntax had changed a lot of time ago, but for > unknown reason > userdocs got lost their updates about the new format. > > See i18n samples to get the idea. Next week I'll update docs > and hopefully > will provide a DTD or XSD for i18n markup. > > > > > sitemap.xmap: > > > > <map:match pattern="test"> > > <map:generate src="prototyp/first.xml"/> > > <map:transform type="i18n" src="prototyp/dictionary.xml"/> > > <map:serialize type="xml"/> > > </map:match> > > > > When running the example I got the message: > > > > The org.apache.cocoon.www.sitemap_xmap notifies that > > org.apache.cocoon.ProcessingException says: > > > > Unable to locate resource: messages > > > > Does anybody know what this means and what could be wrong. I > > took the syntax from the userdoc. How does i18n know which > > language I want to have? > > Language is choosen using LocaleAction's getLocaleAttribute() > method. See > LocaleAction javadocs to see how it's performed. As soon as I've had a > little free time I'll add also a sitemap parameter support for i18n > transformer. In that case you would be able to select the > locale in any way > you like, e.g. from the URL like this '/host/en_US/page.xml'. > > > > > Please help me. > > The best help you'll get from the samples, see i18n/ > directory in cocoon > webapp. > > Regards, > Konstantin Piroumian > > > > > Regards > > - Volker - > > > > > > > --------------------------------------------------------------------- > > 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]> > > > --------------------------------------------------------------------- > 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]>