I usually do this

                        Locale locale = new Locale(tokens[0],tokens[1]);
                        } else {
        
if(!queries.isLocaleSupported(locale.toString())){
                                        log.debug("Locale "+locale+" no
soportado. Lo sustituimos por US");
                                        locale = Locale.US;
                                }
                        }
                        log.info("User Locale is "+locale);
        
sessionAttributes.put(I18nInterceptor.DEFAULT_SESSION_ATTRIBUTE,
locale); 

-----Original Message-----
From: sumitjain23 [mailto:sumitjai...@gmail.com] 
Sent: Sunday, March 13, 2011 2:39 PM
To: user@struts.apache.org
Subject: struts 2 internationalization problem

I am developing struts 2.2 application. When I pass a request_locale
parameter from a web page then it works fine i.e. the locale changes.
But when I try to change it programatically by setting the session
parameter

session.setAttribute("WW_TRANS_I18N_LOCALE", "fr");

it does not work i.e. the locale does not change

Am I missing something. Please help me..


--
View this message in context:
http://struts.1045723.n5.nabble.com/struts-2-internationalization-proble
m-tp3555588p3555588.html
Sent from the Struts - User mailing list archive at Nabble.com.

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


Internet communications are not secure and therefore Banco
Santander International does not accept legal responsibility for
the contents of this message. Any views or opinions presented
are solely those of the author and do not necessarily represent
those of Banco Santander International unless otherwise
specifically stated.

Las comunicaciones v'ia Internet no son seguras y, por lo tanto,
Banco Santander International no asume responsabilidad legal
ni de ning'un otro tipo por el contenido de este mensaje.
Cualquier opini'on transmitida pertenece 'unicamente al autor y
no necesariamente representa la opini'on de Banco Santander
International, a no ser que est'e expresamente detallado.

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

Reply via email to