Results 1 to 2 of 2

Thread: I18n

  1. #1
    Join Date
    May 2011
    Posts
    7

    Default I18n

    Hi there.
    If I use this settings:
    Code:
    <bean id="localeResolver"
    		class="org.springframework.web.servlet.i18n.SessionLocaleResolver">
    		<property name="defaultLocale" value="de" />
    	</bean>
    	<bean id="localeChangeInterceptor"
    		class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
    		<property name="paramName" value="localeId" />
    	</bean>
    	<bean class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping" >
    		<property name="interceptors">
    		   <list>
    			<ref bean="localeChangeInterceptor" />
    		   </list>
    		</property>
    	</bean>
    the localeId variable should be in url all the time. Is there any way to put it to session?
    Thanks

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    Default

    It has to be on the url only once to change the locale, after that it is stored in the session. So only use it to change after that it is in the session...
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •