Internationalization: properties best practices

K

Karsten Wutzke

Hi all!

I have several language packs (locales) that I wish to support via
ResourceBundle:

"en_US"
"en_GB"
"de"
"fr"
"es"
.... (no more locales with country codes)

These are all backed by .properties files delivered within the JAR.

LanguagePack_en_US.properties
LanguagePack_en_GB.properties
LanguagePack_de.properties
LanguagePack_fr.properties
LanguagePack_es.properties
....

1. Do you usually deliver a language pack called "en", too? Why or why
not? In my case, every file delivered gets selectable in the GUI so it
is rather undesirable to do so... (?)

2. Do you usually create the root locale language pack
"LanguagePack.properties" as a class?

3. The default locale will be "en_US". This is the fallback language
pack if nothing else goes (as far as I understand). So in "en_GB",
would I only put key-value pairs into that file that are different
from the parent "en" or root language pack? If the root language pack
contained all key-values of the "en_US" properties file the file
LanguagePack_en_US.properties could essentially become empty (no
matter if I created the root language pack created via a property file
or via class file). Is that the/a best practice?

4. As a German, I might also create the root package in German and
leave the "de" file empty, how would I proceed with the key-value
pairs of "en_US" and "en_GB" then? Create an "en" language pack, make
"en_US" file empty and put only the differences into "en_GB"? (I would
then have to deal with the "en" being selectable problem but thats
another issue)

Comments anyone?

TIA
Karsten
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top