[ https://issues.apache.org/struts/browse/STR-3061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Benedict updated STR-3061: ------------------------------- Flags: [Patch, Important] (was: [Important, Patch]) Priority: Major (was: Critical) Fix Version/s: (was: 1.3.8) 1.3.6 > The tag bean:message always fetch Chinese resource even the user locale is > set as English. > ------------------------------------------------------------------------------------------ > > Key: STR-3061 > URL: https://issues.apache.org/struts/browse/STR-3061 > Project: Struts 1 > Issue Type: Bug > Components: Taglibs > Affects Versions: 1.1.0 > Environment: Windows 2000 server + JDK1.4.04 > Reporter: qiuhao > Fix For: 1.3.6 > > > Set the language of IE as English. The locale of JVM is zh_CN. > <bean:message key=...> will always fetch localized message from > application_zh_CN.properties instead of application.properties. > Please refer to the following script: > **************************************************************************** > <%@ page contentType="text/html; charset=utf-8" %> > <%@ page language="java" session="true" %> > <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> > <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> > <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> > <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> > <html:html locale="true"> > <c:set var="localeKey"> > <%=org.apache.struts.Globals.LOCALE_KEY %> > </c:set> > <fmt:setLocale value="${sessionScope[localeKey]}"/> > <fmt:setBundle basename="ApplicationResources"/> > fmt1=<fmt:message key="logged.in.txt"/></p> > fmt2=<fmt:message key="app.logon.password.txt"/></p> > bean1=<bean:message key="search.tabBanner.account.txt"/></p> > **************************************************************************** > The "fmt:messge" tag output English message, while "bean:message" output > Chinese message. > This problem can only be found when locale of JVM is set as "zh_CN" or "zh_TW > ". -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.