This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 93911 - I18N - RFE - provide way to switch locale at runtime for multipage application
Summary: I18N - RFE - provide way to switch locale at runtime for multipage application
Status: NEW
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Winston Prakash
Keywords: I18N
Depends on:
Reported: 2007-02-01 23:44 UTC by bugbridge
Modified: 2007-03-05 21:20 UTC (History)
2 users (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description bugbridge 2007-02-01 23:44:37 UTC
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. 

customer feedback

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.
For example:
- 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."