struts 2.1.6

Struts2 i18n where application default locale doesn't match app server locale

I have a struts2 (2.1.6) based webapp which has two languages - english and norwegian. The default language for the app is norwegian - the application server (glassfish 2.1) is running under the english locale.

It didn't seem to matter what value I passed in to the request_locale parameter - I always got english.

There are two language files:

  • global_messages.properties (norwegian)
  • global_messages_en.properties (english)

The struts constant struts.custom.i18n.resources was set to "global_messages" in struts.xml.

Subscribe to RSS - struts 2.1.6