You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andre Wittenburg <an...@cth.de> on 2000/12/19 12:36:12 UTC
i18n problem
Hi!
I do have some problems with the messages displayed via <bean:message
key="myKey"/>. The documentation says, that if no Locale is specified the
default locale from the Action class will be taken. When i ask for the
Locale in the jsp with the following commands, i get the locale which i set
during the logon procedure, but the messages are taken from the default
MessageResource...
-----------------
Locale<br>
Language:<%=((java.util.Locale)
session.getAttribute(org.apache.struts.action.Action.LOCALE_KEY)).getLanguag
e()%>
<br>
Country:<%=((java.util.Locale)
session.getAttribute(org.apache.struts.action.Action.LOCALE_KEY)).getCountry
()%>
-----------------
the result is:
Locale
Language: de
Country: DE
but ApplicationResources.properties is taken and not
ApplicationResources_de.properties ?
Any help or suggestions ?
Thanx
Andre
Re: i18n problem
Posted by Johan Compagner <jc...@j-com.nl>.
Which build do you use?
There are some problems with locale property resources with of 17 december
I don't know if these are fixed with a later release.
See my bug report about properties don't load anymore.
I haven't heard anything back from my mail but i am hoping that it get's fixed.
Just let The ResourceBundle class do its work
loading the right .properties or .class files for a given locale.
johan compagner
----- Original Message -----
From: "Andre Wittenburg" <an...@cth.de>
To: <st...@jakarta.apache.org>
Sent: Tuesday, December 19, 2000 12:36 PM
Subject: i18n problem
> Hi!
>
> I do have some problems with the messages displayed via <bean:message
> key="myKey"/>. The documentation says, that if no Locale is specified the
> default locale from the Action class will be taken. When i ask for the
> Locale in the jsp with the following commands, i get the locale which i set
> during the logon procedure, but the messages are taken from the default
> MessageResource...
> -----------------
> Locale<br>
> Language:<%=((java.util.Locale)
> session.getAttribute(org.apache.struts.action.Action.LOCALE_KEY)).getLanguag
> e()%>
> <br>
> Country:<%=((java.util.Locale)
> session.getAttribute(org.apache.struts.action.Action.LOCALE_KEY)).getCountry
> ()%>
> -----------------
> the result is:
> Locale
> Language: de
> Country: DE
>
> but ApplicationResources.properties is taken and not
> ApplicationResources_de.properties ?
>
> Any help or suggestions ?
>
> Thanx
> Andre
>