[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Languages, translations, locales, timezones, keyboard layouts and the lang-table

Martin Gracik (mgracik redhat com) said: 
> 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:

It's essentially the short form of the locale. But I don't think we use
it for anything any more. *However*, if we're setting languages for
the transaction/langpack plugin, we need to (for example) set both
'cs_CZ' and 'cs' as allowed langauges.

> Another problem is the 3rd column "text mode supported". Any ideas how
> we can get rid of this information from the lang-table?

Drop text mode! (You knew that was coming.)

The algorithm you want to use for supporting text mode is essentially:

- Is it a Latin or Cyrillic script -> yes
- Otherwise -> no

In lang.sh, we explicitly blacklist ja, ko, si, zh, ar, fa, he, and
any *_IN that isn't English, but  there's probably a better way to do

> The last part (5th column) is the preferred keyboard layout, which I
> think we can get from system-config-keyboard, as we do try in language.py
> now.

That's just moving it to another lookup table, though - what happnes if
the s-c-keyboard code goes away?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]