You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "C. Grobmeier" <gr...@possessed.de> on 2006/02/02 11:10:07 UTC

Setting the default locale

Hi all,

my webapplication should always start up for every user with locale 
"de". How can i manage this easily? I thought on having 
<default-locale>de</default-locale> in the web.xml or something like 
that or better having it in struts-config.xml

At the moment the browser locale is beeing used. Seems that the JSF guys 
have something like this. I am sure Struts offer the same, but i was 
unable to find something about this in the lists and the docs.. maybe 
somebody has a good link for me.

Thank you in advance,
Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Setting the default locale

Posted by Laurie Harper <la...@holoweb.net>.
C. Grobmeier wrote:
> Hi all,
> 
> my webapplication should always start up for every user with locale 
> "de". How can i manage this easily? I thought on having 
> <default-locale>de</default-locale> in the web.xml or something like 
> that or better having it in struts-config.xml
> 
> At the moment the browser locale is beeing used. Seems that the JSF guys 
> have something like this. I am sure Struts offer the same, but i was 
> unable to find something about this in the lists and the docs.. maybe 
> somebody has a good link for me.

The Struts Action framework doesn't include locale management features 
like this AFAIK. If you always need the same locale, though, you can use 
a filter to set it at the start of each request, set it in each action 
(if you always route requests through actions, not direct to JSPs) or 
specify it explicitly in the JSP.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org