[brailleblaster] Localizing with PropertyResourceBundle

  • From: "John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxxx>
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Fri, 3 Dec 2010 20:47:36 -0600

The tutorial does not discuss PropertyResourceBundle. I'm having a bit 
of trouble understanding the source code. You are supposed to call the 
constructor with a Reader type, but Readir is an abstract class, and the 
user is supposed to implement certain methods. How can this be? How do I 
tell propertyResourceBundle to read a file?

Do the names of the properties files have to conform to a certain 
format, like blastlocale_en_GB.properties

How are characters outside the usual "printable" range represented? For 
example how would a Hebrew letter be represented in the value of a key? 
How are different encodings handled?

I want to encapsulate all the localization code within one package, so 
the locale can be specified in a setup routine and when we want to 
assign a string to a label or mesage we can just call a simple method 
with the key. I know from experience that unless one gets in the habit 
of using such a technique in the beginning it is very difficult to apply 
it later.

John

-- 
John J. Boyer; President, Chief Software Developer
Abilitiessoft, Inc.
http://www.abilitiessoft.com
Madison, Wisconsin USA
Developing software for people with disabilities


Other related posts: