Announcement Announcement Module
No announcement yet.
Making PropertyPlaceholderConfigurer locale-aware Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Making PropertyPlaceholderConfigurer locale-aware

    I'm implementing Spring in a large codebase and need to make the files - for configuring our System - locale sensitive?

    I know of the ResourceBundleMessageSource class being able to make the properties files locale sensitive.
    However the way of referring to a key/value pair using the ${some.key} does not seem to be supported.

    On the other hand the PropertyPlaceholderConfigurer has the ability to use the ${some.key} form, but is not locale sensitive.

    Is there any way of combining the 2 and making the PropertyPlaceholderConfigurer locale sensitive?

    I can obviously do it my self but it seems odd that this feature is not already supported by Spring.

    Am I missing something?

  • #2
    As far as I am aware of, there exists no such feature out of the box. Though, as you said, it should not be very hard to add.

    I just wonder why you need to localize your configuration? Which locale-dependent properties does your application have (other than those that could be handled by standard Java locale support)?
    I'm just asking, because maybe there is another solution for your issue.