We are using this code, in the J2ee reference implementation, to load the
appropriate resource bundle for the client's locale.
<% Locale currentLocale = request.getLocale();
ResourceBundle bundle=ResourceBundle.getBundle("pathToPropertiesFile",
currentLocale);
%>
with the appropriate classpath for our project.
The problem we are encountering is that while it will load the appropriate
file if the language and the country is specified. eg. html_es_MX.properties
will load if the if the client is set to match. We also defined a
html_es.properties file. When we set the client to spanish/ecuador the class
documentation says that ResourceBundle.getBundle should try to load
baseclass + "_" + language1 + "_" + country1 + ".properties" and then
baseclass + "_" + language1 + ".properties" if the first isn't found. (see
below for the full description of how it should bubble down.
baseclass + "_" + language1 + "_" + country1 + "_" + variant1
baseclass + "_" + language1 + "_" + country1 + "_" + variant1 +
".properties"
baseclass + "_" + language1 + "_" + country1
baseclass + "_" + language1 + "_" + country1 + ".properties"
baseclass + "_" + language1
baseclass + "_" + language1 + ".properties"
baseclass + "_" + language2 + "_" + country2 + "_" + variant2
baseclass + "_" + language2 + "_" + country2 + "_" + variant2 +
".properties"
baseclass + "_" + language2 + "_" + country2
baseclass + "_" + language2 + "_" + country2 + ".properties"
baseclass + "_" + language2
baseclass + "_" + language2 + ".properties"
baseclass
baseclass + ".properties"
Does anyone know why this isn't working as documented?
TIA,
Steve
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets