You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/05/27 17:52:39 UTC
DO NOT REPLY [Bug 20265] New: -
Locale missing when constructing a MessageFormat in MessageResources
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20265>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20265
Locale missing when constructing a MessageFormat in MessageResources
Summary: Locale missing when constructing a MessageFormat in
MessageResources
Product: Struts
Version: 1.1 RC1
Platform: All
OS/Version: All
Status: NEW
Severity: Major
Priority: Other
Component: Unknown
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: mbaroukh@cardiweb.com
in method
org.apache.struts.util.MessageResources.getMessage(Locale locale, String key,
Object args[])
a MessageFormat is constructed :
...
format = new MessageFormat(escape(formatString));
...
this line should be replaces with
format = new MessageFormat(escape(formatString), locale);
else it use the machine default locale instead of the locale asked for the message.
So, if a key contain something like
mykey.format=the date is {0,date,EEEEEEE dd MMMM yyyy}
the mesage will be internationalized but not the format of the date inside ...
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org