You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Paul Benedict (JIRA)" <ji...@apache.org> on 2006/11/26 05:56:57 UTC
[jira] Updated: (STR-2282) Override default locale per application
[ http://issues.apache.org/struts/browse/STR-2282?page=all ]
Paul Benedict updated STR-2282:
-------------------------------
Bugzilla Id: (was: 32242)
Fix Version/s: 1.3.6
Assignee: (was: Struts Developers)
> Override default locale per application
> ---------------------------------------
>
> Key: STR-2282
> URL: http://issues.apache.org/struts/browse/STR-2282
> Project: Struts 1
> Issue Type: Improvement
> Components: Core
> Affects Versions: 1.2.4
> Environment: Operating System: Linux
> Platform: PC
> Reporter: Chris Searle
> Priority: Minor
> Fix For: 1.3.6
>
>
> As far as I understand it - the struts framework will set the locale in the
> users session to Locale.getDefault() when
> 1) The session value for locale is not already set
> and
> 2) The users browser has not sent an Accept-Language header
> So - to set a default locale for an application you need to set the default
> locale for the application's JVM.
> Under JBoss (maybe others) - one JVM is shared across applications. This means
> that it is not possible to handle the situation where one struts app needs lang1
> as default and one struts app needs lang2 as default.
> Concrete example
> App1 has the following property files (and should default to english)
> app1.properties (in english)
> app1_no.properties (norwegian)
> app1_da.properties (danish)
> App2 has the following property files (and should default to norwegian)
> app2.properties (in norwegian)
> app2_en.properties (english)
> System locale is english.
> This means that app2 actually defaults to english since system locale is in
> english and app2 has an english properties file.
> It would be nice to be able to set at struts-config.xml level (perhaps
> controller section) an
> <default-language>no</default-language>
> so that you can override the default locale on a per application basis.
> Note - all other locale based stuff is working well - this is just talking about
> the initialisation of the session locale based on default locale.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira