jQuery in Action, 3rd edition
The moose likes Struts and the fly likes Question on i18n Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Question on i18n" Watch "Question on i18n" New topic

Question on i18n

Xavier George
Ranch Hand

Joined: Jul 29, 2005
Posts: 39
I need to know how to generate message in jsp from specific ApplicationResources property file. In other words, when I write <bean:message key="app.hello" />. How to instruct JSP to call app.hello from German/French/Italian ApplicationResources_xx.properties. Below is my 3 properties file

The German ApplicationResources_de.properties file.

The French ApplicationResources_fr.properties file.

The Italian ApplicationResources_it.properties file.

Do I need to creat locale object in JSP based on user selection of specific country or do I need to populate specific locale object in the request object?
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
You set a locale object in the HttpSession. The Struts Action class that is the superclass for your action class has a method setLocale() that will accomplish this.

Consultant, Sima Solutions
Xavier George
Ranch Hand

Joined: Jul 29, 2005
Posts: 39
Thanks for your response. Thats what I was thinking.
Nyanas Kandhan
Ranch Hand

Joined: Jan 27, 2009
Posts: 35
For an example on Struts internationalization you can refer here.

Struts I18N using locale.
Struts Internationalization using browser settings.

Struts Developer

David Newton

Joined: Sep 29, 2008
Posts: 12617

That was a two-year old finished thread--why are you doing this?
I agree. Here's the link: http://aspose.com/file-tools
subject: Question on i18n
jQuery in Action, 3rd edition