diff options
author | rahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-12 00:08:01 +0000 |
---|---|---|
committer | rahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-12 00:08:01 +0000 |
commit | 0006f107ce835ea234dc8ae0bc8b220d9cef0f31 (patch) | |
tree | 2b2621982c5f401a3b17c7b2a4a45e15b33cb9c1 /chrome/installer/util/l10n_string_util.cc | |
parent | 1ca167074bb41971e51b48859a9c5e15d6d3d4f0 (diff) | |
download | chromium_src-0006f107ce835ea234dc8ae0bc8b220d9cef0f31.zip chromium_src-0006f107ce835ea234dc8ae0bc8b220d9cef0f31.tar.gz chromium_src-0006f107ce835ea234dc8ae0bc8b220d9cef0f31.tar.bz2 |
Instead of returning false we should default to en-us when we fail to get locale.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/l10n_string_util.cc')
-rw-r--r-- | chrome/installer/util/l10n_string_util.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/installer/util/l10n_string_util.cc b/chrome/installer/util/l10n_string_util.cc index b10e1a4..97c9d76 100644 --- a/chrome/installer/util/l10n_string_util.cc +++ b/chrome/installer/util/l10n_string_util.cc @@ -18,8 +18,10 @@ std::wstring GetSystemLanguage() { // We don't have ICU at this point, so we use win32 apis. LCID id = GetThreadLocale(); int length = GetLocaleInfo(id, LOCALE_SISO639LANGNAME, 0, 0); - if (0 == length) - return false; + if (0 == length) { + language = L"en-us"; + return language; + } length = GetLocaleInfo(id, LOCALE_SISO639LANGNAME, WriteInto(&language, length), length); DCHECK(length == language.length() + 1); |