I recently used <bean:message> with locale in the way you're describing, and it picked up the locale that's set as Globals.LOCALE_KEY. If you want, you can get the code in http://www.rabago.net/struts/formdef/downloads.htm. Look for the locale.war sample app.
Hubert --- Hernan Soulages <[EMAIL PROTECTED]> wrote: > Seems your right. > (Locale) request.getSession().getAttribute(Globals.LOCALE_KEY); > does give me the Locale I just set. My problem is that I wan't to > programatically set the language for all the aplication, including the > <bean:message key="keyname"/> in the JSPs. I thought setLocale() did the > trick. How do I set de Locale for the bean:message tags? > > Thanks > Hernan > > > My understanding of it (which could be incorrect) is that > > setLocale(request, > > locale) only sets the locale that Struts uses internally. It doesn't set > > the > > locale that the request object uses, or any other processes that looks > for > > locale in the request object. > > If you somehow need the locale that you've set in this code, call "locale > > = > > (Locale) request.getSession().getAttribute(Globals.LOCALE_KEY);" in > Struts > > 1.1, or "RequestUtils.getUserLocale(request, null);" in 1.2. > > > > Hubert > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]