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 Final
Environment: Windows 2000 server + JDK1.4.04
Reporter: qiuhao
Priority: Critical
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.