Issue Details (XML | Word | Printable)

Key: STR-3061
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Priority: Major Major
Assignee: Unassigned
Reporter: qiuhao
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Struts 1

The tag bean:message always fetch Chinese resource even the user locale is set as English.

Created: 04/Jul/07 05:40 AM   Updated: 20/Aug/07 09:47 AM
Return to search
Component/s: Tag Libraries
Affects Version/s: 1.1.0
Fix Version/s: 1.3.6

Environment: Windows 2000 server + JDK1.4.04
Issue Links:
Duplicate
 
Incorporates
 

Flags: Important, Patch


 Description  « Hide
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 ".

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.