Announcement Announcement Module
Collapse
No announcement yet.
Accessing proper resource bundle in Spring Framework Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Accessing proper resource bundle in Spring Framework

    Hi,

    I am trying to access a resource bundle using Spring framework (WebFlow). A messages.properties file and accordingly messages_ar_AE.properties file are kept in the classpath from where the Spring Framework access the resource bundle.

    The code in invoked from a xhtml file using the JSTL resourceBundle attribute.
    Code:
    <myCustom:includedInSetValidator set="5.0, 5.0.1, 5.1" 
                                validationMessage="#{resourceBundle['jboss.version.error']}" />
    But irrespective of locale, the
    Code:
    "#{resourceBundle['jboss.version.error']}"
    always fetches the default text, i.e; from English;

    As I learned from some forums I got an hint that I need to handle this using LocaleChangeInterceptor or some other predefined classes. Once the Spring Locale is set, the proper resource bundle will be loaded by default, and hence solving my problem.

    I need a way to change the Spring Framework Locale programatically to set the Locale. How do I achieve this programatically ?

    Thanks.
Working...
X