Hi,
I am trying to achieve internationlization in
struts.
I understand we can achieve using browser settings which i have done.
But i need to do this with setLocale().
Code is below
I have all properties file of languages here:
WEB-INF/classes/
Entry in web.xml
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
Entry in struts-config.xml
<message-resources parameter="ApplicationResources"/>
Entry in JSP- sample one
<bean:message key="test.submit"/>
Entry in Base class
THe parent application has set the language preference[which is a text box in the login page]
as a cookie in the response.
My application iterates and gets the localeValue(it,en_GB,De....).
This is set in base class
Locale locale = new Locale(localeValue);
setLocale(request, locale);
My question is:
When i hit my
JSP[Is there anything else i need to do in JSP],
how will it pick up the corresponding ApplicationResources.properties.
Suppose i have localeValue=en_GB, then how will it pick up
ApplicationResources_en_GB.properties.