Internationalization


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Internationalization

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Posts
    1

    Internationalization

    Hi,

    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:

    en_US:
    button_name = English

    se_SE:
    button_name = svenska

    ja_JP:
    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:

    file: Localization_en_US.properties
    button_name = English

    file: Localization_se_SE.properties
    button_name = Svenska

    file: Localization_ja_JP.properties
    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 02:46 AM.

  2. #2
    Join Date
    May 2005
    Location
    Ontario, Canada
    Posts
    173
    Hi,
    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,

Similar Threads

  1. System menu internationalization
    By zwirek in forum Java
    Replies: 0
    Last Post: 09-06-2006, 02:23 PM
  2. Replies: 13
    Last Post: 05-23-2005, 05:22 PM
  3. XML and Internationalization
    By Steven Upton in forum XML
    Replies: 1
    Last Post: 01-28-2002, 05:23 PM
  4. Internationalization with XML
    By Daniel in forum XML
    Replies: 0
    Last Post: 03-16-2001, 05:00 AM
  5. internationalization and Web sites
    By ray in forum Enterprise
    Replies: 0
    Last Post: 03-17-2000, 12:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center