FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 12-06-2011, 11:25 AM
Martin Gracik
 
Default 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

or:

Portuguese pt True pt_PT.UTF-8 pt-latin1 Europe/Lisbon
Portuguese(Brazilian) pt_BR True pt_BR.UTF-8 br-abnt2 America/Sao_Paulo

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

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.

If anyone has some better ideas please let me know.

Thanks.

--

Martin Gracik

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 01:08 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org