You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by Sean Gilligan <se...@msgilligan.com> on 2006/01/11 17:18:49 UTC

Re: Locale configuration [Fwd: Re: Multi-language ApplicationResources.properties?]

Thanks, Anil.

I agree it's not much more valuable than renaming the files, but it 
makes configuration management a little easier -- especially if you are 
updating or creating new localizations.

Is this worth submitting as a patch?

I'd love to see dynamic locale setting, but can't commit to implementing 
it myself.  (I'm already welching on my plans to add the Maven2 ant task 
to the build...)

-- Sean

Anil Gangolli wrote:
> 
> 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.
> 


Re: Locale configuration [Fwd: Re: Multi-language ApplicationResources.properties?]

Posted by Sean Gilligan <se...@msgilligan.com>.
Anil Gangolli wrote:

>> Is this worth submitting as a patch?
> 
> I think it's fine as long as the behavior in the case the property is 
> not set is the same as current behavior.
Right.  So I'd put the new property commented out in roller.properties. 
  The recommended way to activate it would be to uncomment it and set 
the right locale in roller-custom.properties.

> Just file an improvement request with or without a patch diff and let me 
> know the bug # or assign it to me if you can.  I'll get around to it 
> before 2.1 goes out.  It's a pretty small change.
Cool.  We should be able to submit a patch early next week.
> 
>>
>> I'd love to see dynamic locale setting, but can't commit to 
> 
> I'll propose something later.  I don't really know what's involved in 
> doing this right, and I'd have to play around.
We have some experience with this in a Turbine-based app, but not idea 
where to start with Roller,  but we'd really love to see this feature 
and could at least provide good testing and feedback (and maybe a patch 
or two when we find a bug ;)

-- Sean

Re: Locale configuration [Fwd: Re: Multi-language ApplicationResources.properties?]

Posted by Anil Gangolli <an...@busybuddha.org>.
Sean Gilligan wrote:

> Thanks, Anil.
>
> I agree it's not much more valuable than renaming the files, but it 
> makes configuration management a little easier -- especially if you 
> are updating or creating new localizations.
>
> Is this worth submitting as a patch?

 I think it's fine as long as the behavior in the case the property is 
not set is the same as current behavior.
Just file an improvement request with or without a patch diff and let me 
know the bug # or assign it to me if you can.  I'll get around to it 
before 2.1 goes out.  It's a pretty small change.

>
> I'd love to see dynamic locale setting, but can't commit to 
> implementing it myself.  (I'm already welching on my plans to add the 
> Maven2 ant task to the build...)

I'll propose something later.  I don't really know what's involved in 
doing this right, and I'd have to play around.

>
> -- Sean
>
> Anil Gangolli wrote:
>
>>
>> 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.
>>
>
>