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.


Reply via email to