Created
October 31, 2014 02:39
-
-
Save guilherfp/ee908e80900de9daadce to your computer and use it in GitHub Desktop.
Exemplo configuração i18n spring.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> | |
<bean id="localeResolver" | |
class="org.springframework.web.servlet.i18n.SessionLocaleResolver"> | |
<property name="defaultLocale" value="en" /> | |
</bean> | |
<bean id="localeChangeInterceptor" | |
class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"> | |
<property name="paramName" value="language" /> | |
</bean> | |
<bean class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping" > | |
<property name="interceptors"> | |
<list> | |
<ref bean="localeChangeInterceptor" /> | |
</list> | |
</property> | |
</bean> | |
<!-- Register the welcome.properties --> | |
<bean id="messageSource" | |
class="org.springframework.context.support.ResourceBundleMessageSource"> | |
<property name="basename" value="welcome" /> | |
</bean> | |
</beans> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment