国际化配置
设置
在spring-mvc.xml中追加 languages/language
在/src/main/webapp/webpage/include/taglib.jsp中添加
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
在/src/main/resources/路径下创建language文件夹 ·在languages文件夹下创建language.properties 文件,按照中文输入 signin=登录 ·管理员
cd C:\wmc\sparker\code\src\main\resources\languages
调用JDK自带的native2ascii工具,运行
native2ascii -encoding UTF-8 language.properties language_zh_CN.properties
系统自动在指定文件夹下创建 language_zh_CN.properties,并将language.properties汉字转为ascii ·在jsp指定位置引用
<spring:message code="signin"/>