SpringMVCの国際化手順の使用
710 ワード
mess.properties
welcome=welcome
mess_zh_CN.properties
Welcome=ようこそ
mess_en_US.properties
welcome=(US)welcome
applicationContext.xml
ページラベル
welcome=welcome
mess_zh_CN.properties
Welcome=ようこそ
mess_en_US.properties
welcome=(US)welcome
applicationContext.xml
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basenames">
<list><!-- -->
<value>mess</value>
</list>
</property>
</bean>
ページラベル
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<spring:message code="welcome"/>