查找locale顺序:
jsp标签<fmt:setLocale value="zh_CN" />或嵌套的<fmt:bundle设置了Locale,
Config是否设置了javax.servlet.jsp.jstl.fmt.locale参数,
否则就由客户端浏览器的语言设置决定,
寻找Config里javax.servlet.jsp.jstl.fmt.fallbackLocale
如果想动态切换语言:需要filter去设置Config.
javax.servlet.jsp.jstl.core.Config;
Config.set(httpRequest.getSession(false), Config.FMT_LOCALE, locale);
jsp标签<fmt:setLocale value="zh_CN" />或嵌套的<fmt:bundle设置了Locale,
Config是否设置了javax.servlet.jsp.jstl.fmt.locale参数,
否则就由客户端浏览器的语言设置决定,
寻找Config里javax.servlet.jsp.jstl.fmt.fallbackLocale
如果想动态切换语言:需要filter去设置Config.
javax.servlet.jsp.jstl.core.Config;
Config.set(httpRequest.getSession(false), Config.FMT_LOCALE, locale);