Announcement Announcement Module
No announcement yet.
Facing issue with locale change in my spring mvc application Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Facing issue with locale change in my spring mvc application

    Hi All,
    I have created a login application using Spring MVC, where I have placed a language selection option in my login screen. If a language is selected a particular link is getting fired. i.e. "localhost:8080/springMVC1/login.htm?siteLanguage=fr"
    I have done following things to activate my locale change activity.
    1. created a message property file for french locale
    2. Added following beans in dispatcher-servlet.xml
    " <bean id="simpleUrlMapping"
    class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
    <property name="interceptors">
    <ref bean="localeChangeInterceptor"/>
    <property name="mappings">
    <prop key="/login.htm">loginCo</prop>

    <!-- Locale change-->
    <bean id="localeChangeInterceptor"
    class="org.springframework.web.servlet.i18n.Locale ChangeInterceptor">
    <property name="paramName" value="siteLanguage"/>

    <bean id="localeResolver"
    class="org.springframework.web.servlet.i18n.Sessio nLocaleResolver"/>
    Now the issue is, if I am changing browser language, the locale of the application is changing properly but if I am selecting french as an option from language dropdown, the page refreshes but remain the same.

    Can anybody help me out?


  • #2
    Facing the same issue

    Dear Amit,

    Were you able to resolve the above mentioned issue. If yes, then how, as i am also facing the problem. Any help is appreciated.