Re: Regarding Struts Internationalization
Posted By:
Anonymous
Posted On:
Friday, November 30, 2007 04:29 AM
First step for this is to make the resource bundle and the next thing have to do is to set the Locale in the action class according to the language selected then struts automatically load the corresponding resource bundle
Re: Regarding Struts Internationalization
Posted By:
darryl_culverwell
Posted On:
Wednesday, October 31, 2007 08:58 AM
Hi,
You can create a resource bundle file (In this case GlobalResources_en_US.properties).
You need to append the locale before the .properties
Then you can reference this in your struts-config.xml file without any locale :
Whey you want to get a specific message from your bundle, get the resource bundle :
MessageResources resourceBundle = (MessageResources) request.getAttribute("org.apache.struts.action.MESSAGE");
resourceBundle.getMessage({CHOOSEN LOCALE}, "a.message.key");
Hope this helps