Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Internationalization (i18n)

 
Vijendra Babar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic