Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Switching locale programmatically

Status
Not open for further replies.

IPavlik

Programmer
Dec 9, 2006
2
0
0
SK
Hello.

I need to use some locale switching behavior in struts application. I tried Action.setLocale(HttpServletRequest, Locale), but first populated values from resource bundles were shown for locale, which I switched to, so after several requests and swithing of the locale some mixed content of both locales was displayed.

Is there any other way to switch the current locale or some setup of the application?

Thanks for any ideas.
 
If you're accessing the messages from an Action using different locales, you must pass the user locale (with Action.getLocale or something like this) to the getMessage. If you don't do it, it takes always the system locale.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top