summaryrefslogtreecommitdiffstats
path: root/app/l10n_util.cc
diff options
context:
space:
mode:
authorthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-12 20:33:05 +0000
committerthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-12 20:33:05 +0000
commit885b72726cd788273b305da33d04c65cfa130d09 (patch)
treebb23ed9f0f54655773ec102b10eb234c69090f0e /app/l10n_util.cc
parente56861937b3bdea9ecafc082f6dd29c52bd16bee (diff)
downloadchromium_src-885b72726cd788273b305da33d04c65cfa130d09.zip
chromium_src-885b72726cd788273b305da33d04c65cfa130d09.tar.gz
chromium_src-885b72726cd788273b305da33d04c65cfa130d09.tar.bz2
Move the menu bar l10n into the xib file.
Localize the menu bar titles. Have the browser platform delegate startup the resource bundle system so we can fetch localization data. Make l10n_util::GetApplicationLocale return what cocoa says for the language so we match what the UI is using. TEST=everything still works. BUG=17380 Review URL: http://codereview.chromium.org/164413 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23215 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/l10n_util.cc')
-rw-r--r--app/l10n_util.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/app/l10n_util.cc b/app/l10n_util.cc
index 751a41c..1330263 100644
--- a/app/l10n_util.cc
+++ b/app/l10n_util.cc
@@ -220,15 +220,12 @@ namespace l10n_util {
// Represents the locale-specific text direction.
static TextDirection g_text_direction = UNKNOWN_DIRECTION;
+// On the Mac, we don't want to test preferences or ICU for the language,
+// we want to use whatever Cocoa is using when it loaded the main nib file.
+// It handles all the mapping and fallbacks for us, we just need to ask.
+// See l10n_util_mac for that implementation.
+#if !defined(OS_MACOSX)
std::string GetApplicationLocale(const std::wstring& pref_locale) {
-#if defined(OS_MACOSX)
- // On the mac, we don't want to test preferences or ICU for the language,
- // we want to use whatever Cocoa is using when it loaded the main nib file.
- // It handles all the mapping and fallbacks for us, we just need to ask
- // Cocoa.
- // TODO(pinkerton): break this out into a .mm and ask Cocoa.
- return "en";
-#else
FilePath locale_path;
PathService::Get(app::DIR_LOCALES, &locale_path);
std::string resolved_locale;
@@ -269,8 +266,8 @@ std::string GetApplicationLocale(const std::wstring& pref_locale) {
NOTREACHED();
return std::string();
-#endif
}
+#endif // !defined(OS_MACOSX)
string16 GetDisplayNameForLocale(const std::string& locale_code,
const std::string& display_locale,