struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alfors, Peter" <palf...@delphion.com>
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
processed, 
OR 
you can restart your browser and you should see the new locale. (since you now have a new
session)

HTH,
	pete

-----Original Message-----
From: Brett [mailto:brett@interaccion.es]
Sent: Friday, August 23, 2002 6:17 AM
To: struts-user@jakarta.apache.org
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:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message