Languages, translations, locales, timezones, keyboard layouts and the lang-table
Hi,
with the UI rewrite of the language selection, I would like to get rid of the lang-table, and most of the hardcoded language specific stuff. I got code that can find out all the translations we have available for anaconda in the runtime, and also code to get all available locales, with preferred timezones, native names, etc., and I'm trying to make it work together and put it to language.py.
So the 1st part is to get rid of lang-table and lang-names somehow. The 2nd part is to be able to preselect language/location/timezone to some sane defaults based on the geoip location, or language selection.
So I was looking at language.py, localeinfo.py and the lang-table file, and here's a sample line from lang-table:
Czech cs True cs_CZ.UTF-8 cz-lat2 Europe/Prague
In my code I got "cs_CZ", "Czech" and "Europe/Prague" figured out. I also have the native language name, but some problems arise with the other columns.
What is the 2nd column (short name) for? Do we need it? And if yes, is there some standard where I can get this mapping? Most of the short names are just the language name from the locale, but there are some exceptions where we also use the territory part for the short name to differentiate between the languages, for example:
Chinese(Simplified) zh_CN False zh_CN.UTF-8 us Asia/Shanghai
Chinese(Traditional) zh_TW False zh_TW.UTF-8 us Asia/Taipei