【发布时间】:2014-08-21 12:05:47
【问题描述】:
最近,我正在研究春季国际化。目前项目是用spring webflow搭建的。
我浏览了很多关于 spring 国际化的资料,并尝试了许多不同的配置。还是不行。
xml 文件在这里:
<mvc:interceptors>
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
<property name="paramName" value="sitelocale" />
</bean>
</mvc:interceptors>
<bean id="localeResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver">
<property name="defaultLocale" value="cn" />
</bean>
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basename" value="classpath:test"/>
</bean>
当我更改 defaultLocale 时,我可以看到字符发生了变化,我认为这可能是我的拦截器无法正常工作。当我使用 ?sitelocale=en 或其他语言环境手动更改 url 时,它不起作用。
我已经坚持了整整一周,谁能帮帮我。
【问题讨论】:
标签: spring-webflow