Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

fmt:message not using the correct locale

843836Oct 15 2004 — edited Oct 15 2004
Hello,

I have a webapp which uses struts and jstl. I use the following code snipped to display localized strings

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el"%>
<fmt:message key="label.help"/>

My resource file is specified in struts-config.xml as follows:
<message-resources parameter="com.ibm.psdui.resources.PSDText"/>
I currently have the base file PSDText.properties and a German version PSDText.properties_de.

If I have the language setting in my browser to de, I see the German strings. However if I set the languages to en-us followed by German, I still see the German strings. It seems like fmt:message is using the wrong locale. Just out of curiosity I replaced fmt:message to bean:message and I see the right localized strings. I have to use fmt:message. Am I missing some configuration setting or something?

Thanks in advance,
Kumar
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 12 2004
Added on Oct 15 2004
5 comments
337 views