[brailleblaster] Re: i18n and l10n

  • From: Hanxiao Fu <hxfu829@xxxxxxxxx>
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Sun, 25 Mar 2012 15:21:23 -0500

Hi,

I have figured out the problem of displaying Chinese characters; I applied
the method Michael told me, thank you Michael. I think I need more advise
from you: Now I am trying to build the interfaces for BBMenu to load
specific languages at the user's will. However, how should we know which
locale is wanted? or, how should user change the language of the program?
is it through "file" and then "language" to setup the language they
want? should
the default language of the program be the user's system default locale or
should it be English?

Thanks,
Hanxiao

On Tue, Mar 20, 2012 at 4:25 PM, Michael Whapples <mwhapples@xxxxxxx> wrote:

>   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 <hxfu829@xxxxxxxxx>
> *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: