You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Bogdan Brezoi <bb...@itcnetworks.ro> on 2009/03/05 16:21:54 UTC

Localization problem with tapestry

Hi,

I'm encountering something weird when trying to localize some messages 
using Tapestry.
I'll make a short description of the problem and of the context:

I'm using Tapestry 4.1.6 and have some page messages that should get 
localized. I have the next structure of *.properties file :
WEB-INF/stuff/A.properties
WEB-INF/servlet-name.properties
WEB-INF/X.jar

The X.jar file is actually a localization package. It contains 
*.properties files with the following structure :
WEB-INF/stuff/A_fr.properties
WEB-INF/servlet-name_fr.properties

The problem is that if i have a message which is not stored in 
A.properties or A_fr.properties but in servlet-name.properties and 
servlet-name_fr.properties and i set the browser's (Firefox) language to 
french, this message gets not translated. It gets displayed in english 
(base language for message catalogs).
On the other hand, this happens only with messages in the files on the 
"root" level of the jar file. The messages from the A_fr.properties are 
translated ok.

I think this is somehow related to the inclusion of the jar file because 
if i don't use this jar localization package and i simply put the 
*_fr.properties files, then everything works just fine.

Does anyone have an idea why this happens and how to get it solved? 
Maybe it is some kind of issue related to this problem (i searched the 
issue list on JIRA but couldn't find one) ?

Any help would be gladly appreciated. Thanks,
Bogdan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Localization problem with tapestry

Posted by Howard Lewis Ship <hl...@gmail.com>.
Sorry to say, but just building a JAR that has a WEB-INF folder
doesn't add those files to the web application's context. I believe
Tapestry 4 has options to move the global application catalog onto the
classpath (rather than the default location under WEB-INF in the
context); that's the only way you'll be able to accomplish your goal.

On Thu, Mar 5, 2009 at 7:21 AM, Bogdan Brezoi <bb...@itcnetworks.ro> wrote:
> Hi,
>
> I'm encountering something weird when trying to localize some messages using
> Tapestry.
> I'll make a short description of the problem and of the context:
>
> I'm using Tapestry 4.1.6 and have some page messages that should get
> localized. I have the next structure of *.properties file :
> WEB-INF/stuff/A.properties
> WEB-INF/servlet-name.properties
> WEB-INF/X.jar
>
> The X.jar file is actually a localization package. It contains *.properties
> files with the following structure :
> WEB-INF/stuff/A_fr.properties
> WEB-INF/servlet-name_fr.properties
>
> The problem is that if i have a message which is not stored in A.properties
> or A_fr.properties but in servlet-name.properties and
> servlet-name_fr.properties and i set the browser's (Firefox) language to
> french, this message gets not translated. It gets displayed in english (base
> language for message catalogs).
> On the other hand, this happens only with messages in the files on the
> "root" level of the jar file. The messages from the A_fr.properties are
> translated ok.
>
> I think this is somehow related to the inclusion of the jar file because if
> i don't use this jar localization package and i simply put the
> *_fr.properties files, then everything works just fine.
>
> Does anyone have an idea why this happens and how to get it solved? Maybe it
> is some kind of issue related to this problem (i searched the issue list on
> JIRA but couldn't find one) ?
>
> Any help would be gladly appreciated. Thanks,
> Bogdan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org