diff options
author | glotov@google.com <glotov@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-17 07:29:50 +0000 |
---|---|---|
committer | glotov@google.com <glotov@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-17 07:29:50 +0000 |
commit | ea477c25a06ac425257f1a94081aaca98929ab0f (patch) | |
tree | c0f1dcf6bbed9e88313e98c505001a09a4f7e1dd /app/l10n_util.cc | |
parent | e49d15f77fda6244a958f37d8998bedc73295c3a (diff) | |
download | chromium_src-ea477c25a06ac425257f1a94081aaca98929ab0f.zip chromium_src-ea477c25a06ac425257f1a94081aaca98929ab0f.tar.gz chromium_src-ea477c25a06ac425257f1a94081aaca98929ab0f.tar.bz2 |
Fix of the initial locale set.
(second try, now with unittest)
BUG=35248
TEST=Switch the language used by the ChromiumOS using the top left corner menu of the Network selection wizard.
Or you may use the following command on desktop using Chromium (built with GYP_DEFINES="chromeos=1"):
out/Debug/chrome --login-manager --login-screen=network
Check that the next time you start chromium, the selected language will be the default.
Review URL: http://codereview.chromium.org/982005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41817 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/l10n_util.cc')
-rw-r--r-- | app/l10n_util.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/l10n_util.cc b/app/l10n_util.cc index 727fe25..96659f8 100644 --- a/app/l10n_util.cc +++ b/app/l10n_util.cc @@ -464,6 +464,13 @@ std::string GetApplicationLocale(const std::wstring& pref_locale) { // Next, try the system locale. candidates.push_back(system_locale); + +#elif defined(OS_CHROMEOS) + // On ChromeOS, try user prefs. This restores the locale used by the + // previous run of the OS. + if (!pref_locale.empty()) + candidates.push_back(WideToASCII(pref_locale)); + #elif defined(OS_POSIX) // On POSIX, we also check LANGUAGE environment variable, which is supported // by gettext to specify a priority list of prefered languages. |