Two Laptop Bag
The moose likes Struts and the fly likes How to display JSP in Different Languages? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to display JSP in Different Languages?" Watch "How to display JSP in Different Languages?" New topic

How to display JSP in Different Languages?

Anand Nuchchi

Joined: Apr 15, 2006
Posts: 27
Hi all,
In my project am planning to display the JSP in different languages depending upon there "Locale". Am developing the porject using struts frame work. How to include in the property file regarding this information?
Please give some guidelines so that i can procees.

thanks & regards
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63865

I would find out more about using the 'fmt' class of tags of the JSTL.

[Asking smart questions] [About Bear] [Books by Bear]
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Struts has it's own i18n support built in.

For reasons like this, it's better to ask your questions in the Struts forum than in the JSP forum if you are building your app with Struts.

Moving to the Struts forum.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
This link gives a pretty good explanation of how Struts handles i18n. The only thing it fails to mention is that in order to test different languages, you have to change the language setting in your browser. In Internet Explorer, this is done by:

1-Select Tools-->Internet Options from the menu
2-Click the "General" tab and then the "Languages" button.
3-Add any number of languages with the "Add" button, but make sure the language you want to test is at the top of the list.

This process is pretty similar for other browsers.

Consultant, Sima Solutions
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

I agree. Here's the link:
subject: How to display JSP in Different Languages?
It's not a secret anymore!