Bug 16932

Summary: i18n:message uses wrong resource bundle
Product: Taglibs Reporter: Johann Uhrmann <johann.uhrmann>
Component: I18N TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED DUPLICATE    
Severity: critical    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
URL: http://cvs.apache.org/builds/jakarta-taglibs/nightly/projects/i18n/jakarta-taglibs-i18n-20040613.zip
Attachments: This patch fixes the problem for us ie. browser language setting works as expected.

Description Johann Uhrmann 2003-02-10 16:45:07 UTC
The first request to a web application sets the default locale which is
then used to answer all further requests. (ignoring the browser locales)

System information:
- Tomcat 4.1.12
- I18N nightly build from Feb. 10, 2003
- jdk 1.4.0_01-b03
- Browser: Mozilla 1.2b / Opera 6.1


To reproduce the bug:

1. Install the i18n-taglib example application.
2. Use a browser with an German language setting (de) and click in index.jsp
   on the link "Browser Default".
3. Click on "Message Tags Example Page"
4. Use a different browser with an Englich language setting (en) and
   click on "Browser Default" and "Messages Tags Example Page"

Now both browsers show the same page. Changing the locales with the links
on index.jsp has no effect in "Message Tags Example Page".
Comment 1 Johann Uhrmann 2003-02-11 11:30:01 UTC
The following code fragment seems to be a work-around for this bug:

<i18n:bundle baseName="myBundle" locale="<%= request.getLocale() %>" />

However, this considers only the first language of the web browser.
Comment 2 Ari Suutari 2003-03-05 08:46:51 UTC
Created attachment 5157 [details]
This patch fixes the problem for us ie. browser language setting works as expected.
Comment 3 Felipe Leme 2004-06-04 05:12:11 UTC
Johann and Ari,

This issue seems similiar to bug 18525, which I just fix. Could you please check
if the next nightly build fix it?

Thanks,

Felipe

PS: looks like there is a problem on the nightly builds generation (last one was
on 05/31), so you may need to wait a couple of days until you can check it (you
need a nightly build more recent then 06/04), so please keep an eye on

http://cvs.apache.org/builds/jakarta-taglibs/nightly/projects/i18n/
Comment 4 Felipe Leme 2004-06-13 21:59:26 UTC
The nightly builds are back. Please try to reproduce the issue using the
following link:

http://cvs.apache.org/builds/jakarta-taglibs/nightly/projects/i18n/jakarta-taglibs-i18n-20040613.zip

And let me know the result.

Felipe
Comment 5 Felipe Leme 2004-06-15 03:16:30 UTC
I'm assuming bug 18525 fixed this issue.

*** This bug has been marked as a duplicate of 18525 ***