Sean:
To do what you describe, the "one spot" is BasePageModel; I think that's
all that would need to change for your desired thing. The bundle is
currently initialized in a static initializer using the default locale
(no locale argument supplied). You'd have to change that to initialize,
say on construction, using a Locale determined by a property (obtained
via RollerConfig.getProperty(...)).
I don't think it's that valuable to do this over just renaming the
ApplicationResources.properties files to get the desired effect, but it
shouldn't be very hard to make the changes you want.
I think it's worth discussing further why we don't/can't/shouldn't
choose the bundle locale dynamically per request based on what we can
determine from the browser, or using the logged in user's configured
locale. I don't have a concrete proposal.
--a.
Sean Gilligan wrote:
Hello Anil, et. al.
What we'd like to do is just add a property in roller.properties that
if present overrides the JVM's default locale. (At a minimum, I'm
assuming this is easier than making it work based upon the request or
the user's preference, but I don't know yet.)
> Also, you could modify the code (essentially one spot) to
> use a separately configured locale rather than the JVM default.
Where is that "one spot"?
Thanks,
Sean
-------- Original Message --------
From: - Thu Jan 5 08:05:22 2006
X-Account-Key: account3
X-UIDL: 6f4753a2af27facefef3c1c510c92533
X-Mozilla-Status: 1011
X-Mozilla-Status2: 00000000
Received: from mail.apache.org (hermes.apache.org
[209.237.227.199]) by groundhog.opsystems.com (8.11.6/8.11.6) with
SMTP id k05Eogv07126 for <[EMAIL PROTECTED]>; Thu, 5 Jan
2006 06:50:43 -0800 (PST)
Received: (qmail 10239 invoked by uid 500); 5 Jan 2006 15:03:07 -0000
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Help: <mailto:[EMAIL PROTECTED]>
List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
List-Post: <mailto:[email protected]>
List-Id: <roller-user.incubator.apache.org>
Reply-To: [email protected]
Delivered-To: mailing list [email protected]
Received: (qmail 10199 invoked by uid 99); 5 Jan 2006 15:03:07 -0000
Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49)
by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jan 2006 07:03:07 -0800
X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=
X-Spam-Check-By: apache.org
Received-SPF: pass (asf.osuosl.org: local policy)
Received: from [64.142.80.182] (HELO busybuddha.org) (64.142.80.182)
by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jan 2006 07:03:06 -0800
Received: from [127.0.0.1] (pear.busybuddha.org [64.142.80.182]) by
busybuddha.org (8.13.1/8.12.11) with ESMTP id k05F9qIe025080 for
<[email protected]>; Thu, 5 Jan 2006 07:09:53 -0800
Message-ID: <[EMAIL PROTECTED]>
Date: Thu, 05 Jan 2006 07:03:19 -0800
From: Anil Gangolli <[EMAIL PROTECTED]>
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: [email protected]
Subject: Re: Multi-language ApplicationResources.properties?
References: <[EMAIL PROTECTED]>
In-Reply-To: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Checked: Checked by ClamAV on apache.org
X-UIDL: 6f4753a2af27facefef3c1c510c92533
Sean Gilligan wrote:
Is there a way to have each user of Roller get the Struts UI screens
in the language of his/her configured locale?
Currently, no, but determining the locale based on either the user's
configured locale or the request headers is an enhancement that I think
we ought to support.
I'm not sure why we don't do this already, and if there are any issues
with it. This probably deserves some discussion on the roller-dev list.
Or, if that is not possible, Is there a way to change the
ApplicationResources file used without changing the default locale of
the Tomcat JVM?
Well, certainly, you should be able to move the desired
ApplicationResources_<localespec>.properties file into the default
position ApplicationResources.properties (no locale), removing all of
the others. Also, you could modify the code (essentially one spot) to
use a separately configured locale rather than the JVM default.
Thanks,
Sean