I am trying to create a small application as a help in language studdying. And I want to localize it to a cupple of differant languages, to start with: Japanese, English and swedish.
so I have read loads of articles about internationalization, though my Java-knowledge isn't that strong, and I am still pretty new to Java.
so what I have done this far is setup some .properties files to help out with localization issues. these are still simple, and contains one "variable" for each language, this is then used to change the name of a button when the language is changed.
All fine so far, my three properties files looks like this:
button_name = English
button_name = svenska
button_name = nihongo
so this is all fine, and then I ran into some trouble, namely that both Swedish (and particularly Japanese), have "special Chars", in Swedish it's "åäö" so that's when I started to convert it into UTF8 which didn't pose much problems.
simply made a string, converted it to bytes and used the String constructor that can do this for me, in pseudo it would be something like:
String str1 = "Svenska är kul";
byte  non_unicode = str1.getBytes();
String unicode = new String(non_unicode, "UTF8");
this all worked fine, but for Japanese... well I tried to make a string:
String str1 = 日本語
and realized that my editor (Netbeans v5.5) didn't think highly of this kind of coding
After I have poked around I found out that you can find the chars by using escape-charakteres which uses Hex representation.. but it would be a major pain to find out every kana, not to talk about finding the kanji :P
so on to the question already!
I just wonder if anyone know how I should go about this, what I would like most of all would be if I could simply create three files which looks like this, and then just use the correct charset to render them later on:
button_name = English
button_name = Svenska
button_name = 日本語
I'm not sure if the problem is within my development environment, and if it's something I haven't setup correctly, or if it's simply just not possible to work it the way I wanted, but well I hope you understand my problem and if not I will gladly try to elaborate if it means I can get help solving this problem
Last edited by qrikko; 01-05-2007 at 03:46 AM.
I have the feeling that you have to have software that supports the language that you are trying to use.
For instance, I would like to do something in Arabic language; I believe that, I have to have windows supported with Arabic language. It will be much easier than to try to find the letters from the UNICODE or from the HEX.
I am interested at doing something similar in Arabic to teach my children our mother tongue and I have posted something similar long time ago, but no one get back to me.
If you are interested, you can email me or send a private message.
I wish you a good luck,
Last Post: 09-06-2006, 03:23 PM
Last Post: 05-23-2005, 06:22 PM
By Steven Upton in forum XML
Last Post: 01-28-2002, 06:23 PM
Last Post: 03-16-2001, 06:00 AM
By ray in forum Enterprise
Last Post: 03-17-2000, 01:59 PM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL