Unfortunately, this is the locale sent by browser only. Struts store the user locale in session under the key Globals.LOCALE_KEY. There is a util class which get this info from session and, if this is empty, return the browser locale. So it is possible to programmatically change the user locale. Unless there is some magic filter in struts which alters the locale stored in the request object by copying the session locale into it, accessing ther request.getLocale() is of no help as end user can not change his locale by clicking on a link.
So what am asking is , is ther a way to use that util class of struts without resorting to the use of a scriptlet. Le Mercredi 9 Mars 2005 11:44, Flemming G. Jensen a écrit : > You get the local object from the request with the getLocale() method.. > > --Flemming > > -----Oprindelig meddelelse----- > From: delbd [EMAIL PROTECTED] > Date: Wed, 9 Mar 2005 10:14:36 +0100 > To: user@struts.apache.org > Subject: How to get the user locale from a jsp > > > Hello > > > > How could i get the the user locale, as a page scoped bean, from struts. > > I know there is a struts util class to get the user locale, but i would > > like to get it without resorting to the use of a scriptlet. > > > > Is there a more elegant way of doing this? > > > > I need pass the user selected language as a parameter to a flash. > > > > Thanks. > > -- > > David Delbecq > > Royal Meteorological Institute of Belgium > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- David Delbecq Royal Meteorological Institute of Belgium --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]