struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: i18n
Date Tue, 11 Jul 2000 16:10:09 GMT
Johan Peeters wrote:

> I am having trouble configuring my application with alternate resource
> bundles. I have a properties file '' from
> which struts messages are pulled, just like in the Struts example
> application. I have added a file (same directory) called
> ''. Since I configured my browser
> to give preference to the nl_BE locale, I expect that the messages in
> the latter properties file would be used, but they are not. This does
> not seem to be specific to my application: when I similarly add
> to the Struts example, the default
> resource bundle continues to be used.
> Am I missing something or does the struts:message tag not support yet?

At the moment, Struts does not pay direct attention to the "Accept-Language"
header that your browser sends when it is configured for specific language
preferences.  Instead, it assumes that you have stored a java.util.Locale
object in the user's session, under key "org.apache.struts.action.LOCALE"
(i.e. the value of Action.LOCALE_KEY in the org.apache.struts.action.Action
interface) to identify the user's current preferences.  If no locale is
found here, Struts defaults to the server's default locale.

Paying attention to the Accept-Language header is something that you ought
to be able to configure Struts to do, and I will be looking into that.

> Many Thanks,
> Yo

Craig McClanahan

View raw message