fmt:message not using the correct locale
843836Oct 15 2004 — edited Oct 15 2004Hello,
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