struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Siviero" <ivan.sivi...@concept.it>
Subject bean message
Date Fri, 15 Feb 2002 18:52:37 GMT
I'm a  little bit puzzled about <bean:message> behaviour.
Let's suppose the following situation

ApplicationResources.properties
key1=defaultKey1
key2=defaultKey2

ApplicationResources_de.properties
key1=germanKey1

ApplicationResources_it.properties
key1=italianKey1
key2=italianKey2

To switch the locale i do the following:

request.getSession().setAttribute( Action.LOCALE_KEY,  myLocale );
Let's suppose myLocale is the German locale ( new Locale( "de", "DE") )

<bean:message key="key1"> works fine
<bean:message key="key2"> returns the italianKey2

I was expecting the string 'defaultKey2', why do i get the italian !??!

Another question is: if i create a locale like new Locale ("en", "EN"),
what's the output of  <bean:message key="key2"> ?
my answer would be defaultKey2 but of course i'm wrong as it returns the
italian one !
I will end up to code my personal bean:message tag !!!
Bye
IVan.


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message