[brailleblaster] Re: i18n and l10n

  • From: "Michael Whapples" <mwhapples@xxxxxxx>
  • To: <brailleblaster@xxxxxxxxxxxxx>
  • Date: Tue, 20 Mar 2012 21:25:31 -0000

Hello,
Firstly I think the recommended way of inserting unicode characters in a Java 
string is to use the \uxxxx escape system (eg. String myString = “\u00f6”; ).

May be this link will help explain in more details 
http://docs.oracle.com/javase/tutorial/i18n/text/convertintro.html

While we are at that page we may as well pay attention to the rest of the 
tutorial as its all about i18n 
http://docs.oracle.com/javase/tutorial/i18n/TOC.html

Personally I would vote for the replacement strings to be in separate 
properties files, however I think John previously seemed opposed to it.

Michael Whapples

From: Hanxiao Fu 
Sent: Tuesday, March 20, 2012 8:28 PM
To: brailleblaster@xxxxxxxxxxxxx 
Subject: [brailleblaster] i18n and l10n

Hey guys,


I am trying to work on the localization package. In particular, I am trying to 
implement Chinese locale to the program. For now, I am trying to make the menu 
to be displayed in Chinese. I have followed the process introduced in 
BUILD.txt, so I can run brailleblaster.jar on my computer now. However, I am 
not sure how this process should be proceed since I am not really familiar with 
it : 

1. I have directly changed the text in BBMenu.java into Chinese, just to see if 
it'd work. However, it shows some random characters instead of the Chinese I 
replaced. I think the problem might be the charset setting, but I don't know 
how to fix it. I have changed the source file encoding to UTF-8, but it didn't 
work. 

2. John has sent me an example project to show me how localization works. he 
uses ResourceBundle and Locale classes to realize the localization. I have 
found LocaleHandler.java in localization directory. I suppose this would help 
the language translation during running time. Actually, I am not sure how to 
realize the localization to the menu. Should we use Locale and create 
properties files? 


Any help would be greatly appreciated.


Thanks,
Hanxiao Fu

Other related posts: