AnsweredAssumed Answered

Please do not add unnecessary country codes, e.g. _de_DE

Question asked by mruflin on Mar 31, 2009
Hi all,

I noticed that the recent (3.1) French translation pack simply uses _fr instead of _fr_FR for the translation files and like to encourage other translators (especially for German) to follow that (in my opinion) good example.

Here is the reason why:

Java uses a fallback mechanism for language resources. Let's take as an example a user locale of "_de_DE" (thus, German in Germany) and a message located in The order in which Java looks for the message is following:

Therefore, if a message can't be located in _de_DE, it looks in _de and finally in file (which is in English). While this schema works great for people living in Germany, it unfortunately fails for people living in other countries (following the order for Switzerland):

As German translation files are _de_DE, Swiss people will get the default English translation instead of the German one, while they would get German if the files were named with _de only.

I'm highlighting the problem because in Switzerland we face the same problem with two other languages, French (_fr_FR vs _fr_CH) and Italian (_it_IT vs _it_CH), otherwise I could probably live with simply renaming all files in German language pack :-)

This is just a suggestion/simplification, not a complaint in any means.

Really thanks a lot for the great translation work!