struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alfors, Peter" <>
Subject RE: il8n problem
Date Fri, 23 Aug 2002 14:57:56 GMT
The ActionServlet saves the locale (found in the request) in the session attribute "Action.LOCALE_KEY"
after the first action is processed (if the 'locale' initparam == true).
If you set the 'locale' initparam  to false, then the locale is not set in the session, and
the action uses the default locale for the machine.
For each request, the servlet checks the session for the locale, if it is set, it uses it.
 Therefore, your
new locale will not be recognized.  
You can override the processLocale() method in the ActionServlet to lookup your locale each
time an action is
you can restart your browser and you should see the new locale. (since you now have a new


-----Original Message-----
From: Brett []
Sent: Friday, August 23, 2002 6:17 AM
Subject: il8n problem

Hello Im fairly new to struts and have a problem with il8n.  

I have created a test page which uses a resource bundle to place some text on the page.  In
one language it works fine but when I add another language it doesnt select the new language.
 I have changed my browser to use the second language and in the code I check the Request
to see if the Locale is the correct one.  It is, so I am wondering if I have to set the Locale
somewhere else in order for the page to display properly??

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message