|
From: schmidtm <mat...@mo...> - 2004-06-14 13:56:42
|
Hi *,
I fully localized RssView using ResouceBundles.
We now have an englisch (rssview.properties)and german localization
(rssview_de.properties).
try the german version out with:
LANG=de java -jar rssview.jar or
java -Duser.language=de -jar rssview.jar
Although the support for internationalization in Netbeans is excellent,
It was quite an afford
to get things right. There are some things to mention:
1) There are Typos, remind me of them and i will fix them instantly.
2) No name or term is carved in stone.
3) I used local access to ResouceBundles. There is no need for
optimization at this point.
if we run into serious performance issues, we can load the bundle in
the main-class.
4) If there are just a few Strings-to-be-localized (~ 1-4),
I load them on the fly:
ResourceBundle.getBundle("rssview").getString("Browser_path");
rather then initialize the ResouceBundle:
private ResourceBundle rb;
...
rb = ResourceBundle.getBundle("rssview");
...
rb.getString("Browser_path")
5) The keys are auto-generated and can be changed easily. Some of them
could probably be shorter or more meaningfull
OK - The List of Languages I roughly speak is at an end, but the
groundwork for future localizations is layed.
----------------------------------------------------------------------
Matthias Schmidt
Viehtriftstr. 49
67346 Speyer
Tel.: +49 6232 4867
Fax.: +49 6232 640089
|