diff options
author | glotov@google.com <glotov@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-16 16:02:11 +0000 |
---|---|---|
committer | glotov@google.com <glotov@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-16 16:02:11 +0000 |
commit | 9240dbec8ac8827fc51e7ae6ed712399cb982650 (patch) | |
tree | 354f9a57de7cabef2c2d84ed3e6945cd3a7f2908 /app/l10n_util.cc | |
parent | f644d54e2ba4708602509570f7e99729197b7b98 (diff) | |
download | chromium_src-9240dbec8ac8827fc51e7ae6ed712399cb982650.zip chromium_src-9240dbec8ac8827fc51e7ae6ed712399cb982650.tar.gz chromium_src-9240dbec8ac8827fc51e7ae6ed712399cb982650.tar.bz2 |
Fix of the initial locale set.
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/985001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41728 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..94b93ad 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, first, 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. |