Bug #14702
closedTypo3 shouldn't use country codes for specifying language
0%
Description
It seems that Typo3 currently uses codes in many places when there is a need to specify a language setting. E.g.:
page.config.language = dk
However, "dk" is the ISO 3166-1 country code for Denmark
(see http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html).
The ISO 639-1 language code for Danish is "da" (see
http://www.loc.gov/standards/iso639-2/englangn.html).
Even though language codes and country codes sometimes sometimes overlap (e.g. "de"/"de" for German/Germany), using country codes for specifying language settings is often very problematic for many reasons, many of which can be summarized as follows:
- The language code and the country code may differ, as is the case with "da" for Danish and "dk" for Denmark. Another example is "sv" for Swedish and "se" for Sweden.
- The same code may exist in both the language code standard and the country code standard and correspond to a particular language, but a completely different and totally unrelated country. For example, "bo" is the language code for the Tibetan language, but "bo" is the country code for Bolivia.
- There exists no unique one country<->one language mapping. The number of languages in the world greatly exceeds the number of countries. Many countries have more than one official language, like Belgium, Switzerland, and many others.
If I select the language setting "ch" (which is the country code for Switzerland), which one of the official languages of Switzerland ("de", "fr", "it", or "rm") do I get? Or do I get the language Chamorro ("ch" is the language code for Chamorro)?
The most common solution to avoid these problems is to only allow using language codes (and possibly the complete English name of the language as well) in the context of language settings, and completely avoid mixing it up with country codes.
(issue imported from #M1033)