Internationalization of User Interface
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sachin_chaudhari
Posted On:   Tuesday, May 6, 2003 08:25 AM

Can anyone suggests me how to internationalize text,table headers in User interface.I have a java application with UI designed using Velocity templates(ie using .vm files)


Thanks in advance


Sachin

Re: Internationalization of User Interface

Posted By:   sumedha_singhal  
Posted On:   Tuesday, May 6, 2003 09:09 AM

Try using the international locales and resource Bundle class for the UI text where you have a databse and in one column you store the data to be displayed, in another, you store the corresponding data in another language , replace using the jdbc conncetion.
Use Java 2 (jre 1.3 or jdk 1.3 and above)
So all u need to do is have language specific strings(lets say german) conversion of the english strings in the database.


Table :: fruit

fruitid

1 2

fruitname_english-->Orange, Mango


fruitname_french-->xyz, uye


fruitname_chinese-->$%^,@#^



So....in javacode, lines of code will be...(servlet)


String query;
if(lang=="english")
query = "select fruitname_english from fruit where fruitid = 1"
else if (lang=="french")
query = "select fruitname_french from fruit where fruitid = 1"

ResultSet rs = connection.executeQuery(query);


Then process the output and send to client
About | Sitemap | Contact