Created
January 13, 2012 08:35
-
-
Save benelog/1605099 to your computer and use it in GitHub Desktop.
Spring i18n
This file contains hidden or 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
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> | |
<fmt:message key="main_hello"> | |
<fmt:param>benelog</fmt:param> | |
</fmt:message> |
This file contains hidden or 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
<mvc:interceptors> | |
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor" p:paramName="lang"/> | |
</mvc:interceptors> | |
<bean class="org.springframework.web.servlet.i18n.CookieLocaleResolver" id="localeResolver" p:cookieName="lang"/> | |
<bean class="org.springframework.context.support.ReloadableResourceBundleMessageSource" id="messageSource" | |
p:basenames="WEB-INF/messages/messages,WEB-INF/i18n/application" p:fallbackToSystemLocale="false"/> |
This file contains hidden or 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
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%> | |
<spring:message code="main_hello" arguments="benelog!"/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://dev.anyframejava.org/anyframe/doc/web/3.0.1/webfw/springmvc/basic/locale.html 참조