29e085e4605211cdd73f0c0eb55791acbec625d4 |
|
01-Jul-2012 |
Tor Norbye <tnorbye@google.com> |
Add locale data This checkin adds a new LocaleManager which provides data related to locales and regions, such as (1) The right flag icon to use for a given language and region combination (2) The full name of a language code (3) The full name of a region code Before this CL, the flag icons were determined by looking at the Locale instances installed on the machine, and matching up the language codes with the corresponding country codes. However, that only works for the locales you have installed -- and on a typical Linux installation I tried, there were no other locales, and on a Mac OSX install, many common locales (such as those referenced by standard Android apps) were not included. Instead, we now have a static map of bindings from language to region (though if the language matches the default locale on the system, it will use the associated country of that locale). The full names of the languages and regions are also provided. This allows us to display the corresponding name of a language in the locale menu, such that users don't for example confuse country codes and locales; "ca" isn't Canadian but Catalan, and so on. This checkin also adds all the known language codes into the Language dropdown for the configuration selector, and displays the corresponding language name next to the selection. Similarly, it also sets the relevant flag icon as the page icon for the value XML files. Change-Id: I2a3a6f037a745a6c56aedb38ecd71ba25324f6fb
|