cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piroumian, Konstantin" <>
Subject Re: Cocoon 2 and i18n
Date Fri, 01 Feb 2002 09:43:52 GMT
Please, use plain text format for your messages.
----- Original Message ----- 
From: Chitharanjan  <> Das 
To: <>  
Sent: Friday, February 01, 2002 2:50 AM
Subject: Cocoon 2 and i18n

My env is
Platform Win2K
Cocoon 2.0
TomCat 4.01
The following is my i18n transformer  definition
   <map:transformer     name="i18n"
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"/>
The following is a simple JSP file
<%@ page language='java' session='false' %>
<page xmlns:i18n="">
    <para>This is my first Cocoon2 page!</para>
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   (2002-01-31) 15:15.18:838   [cocoon  ] (/cocoon/jsp/hello2)
HttpProcessor[8080][1]/XMLResourceBundleFactory: Error while loading
resource: messages, locale en_US, bundleName
s_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
I then made a copy of messages_en.xml as messages_en_US.xml and started
cocoon and it started.
Hm, it's strange, because i18n samples in C2.0 work perfect either with
en or en_US locales.  
Question 1:
            Why does it fail if the catalogues file corresponding to
locale (lang_Country) is absent?
Are you sure that the path to catalogue is correct and any file is
present there?
Question 2:
            How do I specify to get translation of text in a different
language at run time ?
            Note: The above formats to print in different languages
It is not supported now. Do you really need that? There were no demand
on this, except for date and number formatting, that do not require
dictionaries for different locales, so I didn't implement.
Question 3:
            How do I initialize the i18n transformers for different
What do you mean? i18n transformer uses
LocaleAction.getLocaleAttribute() to select the users locale based on
request or session parameter or a cookie.
Question 4:
            If any one has samples, would U be kind enough to mail it ?
See samples included with C2.0.
<http://localhost:8080/cocoon/i18n/simple.xml>  and
Please tell me if you have any other problems or suggestions.
accordia, inc 
34347 Maybird Circle
Fremont, CA 94555
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. Accordia Inc. is neither liable for the
proper and incomplete transmission of the information contained in this
communication nor for any delay in its receipt

View raw message