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=23052>.
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=23052

Locale not set on MessageFormat in org.apache.struts.util.MessageResources

           Summary: Locale not set on MessageFormat in
                    org.apache.struts.util.MessageResources
           Product: Struts
           Version: 1.1 Final
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Utilities
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


When using "elementFormat" in messages, the default locale (server) is used 
when MessageFormat does the format.

E.g. formatString="day-of-week: {0,date,EEEE}", given a Date as argument[0], 
takes the weekdays from the default locale and not from the locale set in the 
session.

It could be fixed by inserting a "format.setLocale(locale)" in the getMessage() 
method:

        format = new MessageFormat(escape(formatString));
=>      format.setLocale(locale);
        formats.put(formatKey, format);

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to