- 博客(0)
- 资源 (5)
空空如也
Spring2.5的国际化配置
Spring2.5的国际化配置
基于浏览器语言的国际化配置
使用Spring的MVC,并且配置中有配置Resource文件
<!-- 资源文件绑定器 -->
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basename" value="message-info" />
<property name="useCodeAsDefaultMessage" value="true" />
</bean>
其中,message-info是你的properties文件的通用名。如:我的配置文件叫message-info.properties,message-info_zh_CN.properties等等
只要有了这个配置,然后配置JSP渲染器为JSTL支持的,那么在你的JSP文件中使用fmt标记就可以实现客户浏览器语言国际化了。
如:<fmt:message key="info.login.title" />
其中的info.login.title和你的资源文件对应
2010-08-25
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人