Hello, My env is Platform Win2K Cocoon 2.0 TomCat 4.01 The following is my i18n transformer definition
<map:transformer
name="i18n" src="org.apache.cocoon.transformation.I18nTransformer">
<catalogue-name>messages</catalogue-name>
<catalogue-location>i18n/translations</catalogue-location> The following is my pattern definition for JSP’s <map:match
pattern="jsp/**"> <map:generate type="jsp" src="/docs/samples/jsp/{../1}.jsp"/>
<map:transform
type="i18n"/>
<map:transform src="stylesheets/page/simple-page2html.xsl"/>
<map:serialize
type="html"/> </map:match> The following is a simple JSP file <%@ page language='java' session='false' %> <page
xmlns:i18n="http://apache.org/cocoon/i18n/2.0"> <title>Hello</title> <content>
<para>This is my first Cocoon2 page!</para>
<para><i18n:text>a_key</i18n:text></para>
</content> </page> The i18n/translations directory has the cfollwing
files messages_en.xml , messages _de.xml and messages.xml When I started TomCat 4.01 with
the above configurations, I got the error ERROR
(2002-01-31) 15:15.18:838
[cocoon ]
(/cocoon/jsp/hello2) HttpProcessor[8080][1]/XMLResourceBundleFactory: Error while loading resource:
messages, locale en_US, bundleName
file:/C:/Products/WebServers/TomCat40/webapps/cocoon/i18n/translations/messages_en_US.xml java.io.FileNotFoundException:
C:\Products\WebServers\TomCat40\webapps\cocoon\i18n\translations\messages_en_US.xml
(The system cannot find the file specified) The cocoon was trying to find the messages_en_US.xml,
however the documentation indicates that the priority in finding the catalogue
file is messages_lang_Country.xml messages_country_lang.xml messages_lang.xml messages.xml I then made a copy of messages_en.xml
as messages_en_US.xml and started cocoon and it
started. Question 1: Why
does it fail if the catalogues file corresponding to locale (lang_Country) is absent? Question 2: How
do I specify to get translation of text in a different language at run time ? <para><i18n:text>a_key</i18n:text></para> <para><i18n:text locale=”es_ES”>a_key</i18n:text></para>\ <para><i18n:text locale=”de””>a_key</i18n:text></para> Note:
The above formats to print in different languages fails. Question 3: How
do I initialize the i18n transformers for different locales? Question 4: If
any one has samples, would U be kind enough to mail it ? Regds, Chithjs accordia,
inc 650
279 1137 The information contained
in this communication is intended solely for the use of the individual or
entity to whom it is addressed and others authorized to receive it. It may
contain confidential or legally privileged information. If you are not the
intended recipient you are hereby notified that any disclosure, copying,
distribution or taking any action in reliance on the contents of this
information is strictly prohibited and may be unlawful. If you have received
this communication in error, please notify us immediately by responding to this
email and then delete it from your system. |
- build Cocoon 2.0.1 Chitharanjan Das
- build Cocoon 2.0.1 Andreas John
- Re: build Cocoon 2.0.1 Brandon Rich
- Re: Cocoon 2 and i18n Bernhard Huber
- Re: Cocoon 2 and i18n Piroumian, Konstantin