from customer feedback and based on discussions with Alexander -
if this is duplicate of existing rfe related to i18n, please close
as duplicate; we have looked at existing rfes with words i18n in synopsis and
tried not to file any duplicates.
it is currently not clear to me how this should be done for a
application, so any clarification would be helpful. In the fieldguide
(mentioned below) it is stated that the browser locale is used to set
the initial language. However, this is (in my case) not working.
- start the browser (firefox) with english.
- login into application. displayed in english (correct)
- switch (in application) to german
- displayed in german (but not all pages)
- change default browser locale to german
- close browser
- open browser again, login into application: displayed in english!
(why? note: I removed calls to Locale.setDefault() and
context.getApplication().getDefaultLocale() always returns null)
- restart the application server
- close browser
- open browser again (with locale german), login into application:
displayed in german!
Conclusion: the browser locale is only honored for the very first
accessing the application (very first after an appserver restart)?!?
After that, it is ignored? What I would expect is that the browser
locale (and / or session locale, if the application supports setting
the locale by the user or is based on a database setting) is used to
render the pages in the application for each user individually, but this
does not seem to be the case. (could it be that Locale.getDefault() /
Locale.setDefault() is used in JSF, which is JVM-global?)
The solution in q forum-thread appears to implement
a "locale-per-session" setting, but I would expect this to be in the
framework out-of-the-box and that is what this rfe is about."