summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_main_mac.mm
diff options
context:
space:
mode:
authorthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-19 16:25:04 +0000
committerthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-19 16:25:04 +0000
commit9986ee16343028edb452fe235ac6a8fca5ee12f5 (patch)
tree8f173eb25a6e7b8d10370e38e8dd60ea5d16da94 /chrome/browser/browser_main_mac.mm
parent877161b02f6703bb5694a395de9e8cd4e8a93a3e (diff)
downloadchromium_src-9986ee16343028edb452fe235ac6a8fca5ee12f5.zip
chromium_src-9986ee16343028edb452fe235ac6a8fca5ee12f5.tar.gz
chromium_src-9986ee16343028edb452fe235ac6a8fca5ee12f5.tar.bz2
Mac language/locale cleanup
- Effectively revert revision 28193 (http://codereview.chromium.org/258037), this makes Mac match the other platform for what at it's core is used for the chrome concept of locale. - For the ApplicationLanguage, the browser will end up with what Cocoa picks (same as before) - All other process types will honor the language they got on the command line when starting up. - When asked the apps language, have the same side effect as Windows and Linux has of pushing the language through to ICU also (so dates format right, etc.) - During browser startup, if someone passed a language, bail because Mac can't support that. TEST=The tips on the NTP and the dates on the history page are in the same language at the UI. BUG=26856 BUG=22727 Review URL: http://codereview.chromium.org/399086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32515 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main_mac.mm')
-rw-r--r--chrome/browser/browser_main_mac.mm6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/browser_main_mac.mm b/chrome/browser/browser_main_mac.mm
index 65b6970..27024f06 100644
--- a/chrome/browser/browser_main_mac.mm
+++ b/chrome/browser/browser_main_mac.mm
@@ -6,6 +6,8 @@
#import <Cocoa/Cocoa.h>
+#include "app/app_switches.h"
+#include "app/l10n_util_mac.h"
#include "app/resource_bundle.h"
#include "base/command_line.h"
#include "base/debug_util.h"
@@ -39,6 +41,10 @@ void WillInitializeMainMessageLoop(const MainFunctionParams& parameters) {
// Now load the nib.
[NSBundle loadNibNamed:@"MainMenu" owner:NSApp];
+ // The browser process only wants to support the language Cocoa will use, so
+ // force the app locale to be overriden with that value.
+ l10n_util::OverrideLocaleWithCocoaLocale();
+
// This is a no-op if the KeystoneRegistration framework is not present.
// The framework is only distributed with branded Google Chrome builds.
[[KeystoneGlue defaultKeystoneGlue] registerWithKeystone];