This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Internationalization (i18n) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Internationalization (i18n)" Watch "Internationalization (i18n)" New topic

Internationalization (i18n)

Vijendra Babar

Joined: Jul 28, 2006
Posts: 18

I am using Struts 2.0.

I am using i18n in my application. Main purpose of this application is to show data in Chinise Character, which is working fine. But this is not working for Hindi Character (Country = India).

I first persent layout of my application:

My index form contains 3 url, English, Chinese & Hindi.

On clicking English, browser presents data in English, Same for Chinese.

I have used 3 .properties file with same key but different values.
Using Locale object I am setting locale as

String country = request.getParameter("country").toString();
String language = request.getParameter("language").toString();
setLocale(request,new Locale(language));

This code is written in ones of the action form. Now ever thing works i.e all characters are displayed but on Hindi characters are not displayed.

Necessary font for Hindi is also installed on Machine.

Can any one sort out this?
Dom Lassy
Ranch Hand

Joined: May 05, 2006
Posts: 181
I'm not sure if this will help, but have you ran native2ascii on your app resources file that is giving you trouble?

I'm not an expert on i18n, but it is worth a shot.

native2ascii.exe is part of the jdk.
I agree. Here's the link:
subject: Internationalization (i18n)
Similar Threads
how to translate form data using i18n
add HINDI language in firefox
AJAX-I18N-Struts Query
Character set encoding issue
JSTL formating is not working after setting the locale