my dog learned polymorphism
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
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)
It's not a secret anymore!