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.




Reply via email to