Hello!
I created basic Spring MVC application. I wanted to add internationalization to it, but it doesn't seems to work. It finds english text, but it doesn't change, when I want to switch to another language. I have added *.properties files to src/main/resources and configure beans in root-context.xml . Below are my beans configurations and I have uploaded project here.
Thanks
Beans:
Code:<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"> <property name="basename" value="classpath:messages" /> <property name="defaultEncoding" value="UTF-8"/> </bean> <bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"> <property name="paramName" value="lang" /> </bean> <bean id="localeResolver" class="org.springframework.web.servlet.i18n.CookieLocaleResolver"> <property name="defaultLocale" value="en"/> </bean> <bean id="handlerMapping" class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"> <property name="interceptors"> <ref bean="localeChangeInterceptor" /> </property> </bean>


Reply With Quote
