You need to look at ResourceBundle and i18n:
http://java.sun.com/docs/b
Main Topics
Browse All TopicsHere is my story, I have a message that has parameter, both in other language other than English. e.g. Japanese
e.g.
message = xxxx {0} xxxx;
obj_array = {"yyyy"};
//assume both yyyy and xxxx are japanese characters
Here is my code
MessageFormat.format("mess
Expecting Output: xxxx yyyy xxxx
Actual Output: xxxx {0} xxxx
Why obj_array didn't get passed? What's wrong??
I checked JDK 1.4.2 doc, there is no Locale para for MessageFormat.format(). Anyone has a solution??
Thank you!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
You need to look at ResourceBundle and i18n:
http://java.sun.com/docs/b
I think that's the problem, oraelbis.
the problem I think I have is, I got the value of yyyy in japanese characters, not in unicode. However, xxxx are in unicode format.
I got yyyy from a properties file, which got translated in unicode; however, I don't know why when this value got passed to the message, it's not in unicode.
How can I solve this problem??
Thank you!
Should be able to use the native2ascii tool in the JDK:
http://java.sun.com/j2se/1
You can try my simple program for translating yourtext to unicode too:
http://forjava.dev.juga.ru
Business Accounts
Answer for Membership
by: armoghanPosted on 2005-07-20 at 23:52:07ID: 14491747
According to the following examples. I dont think it should give any problem. though i have not worked on locale specific messages .4.2/docs/ api/java/t ext/ Messag eFormat.ht ml
http://java.sun.com/j2se/1