From 649730244b6b17a86f0132c68fd51400192d28b6 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 29 May 2014 15:21:15 +0800 Subject: [PATCH] Override application locale with system default locale. --- atom/browser/atom_browser_client.cc | 5 +++++ atom/browser/atom_browser_client.h | 1 + 2 files changed, 6 insertions(+) diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index c70b6812ef9e..74b38d6b3090 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -13,6 +13,7 @@ #include "content/public/browser/render_view_host.h" #include "content/public/browser/site_instance.h" #include "content/public/browser/web_contents.h" +#include "ui/base/l10n/l10n_util.h" #include "webkit/common/webpreferences.h" namespace atom { @@ -88,6 +89,10 @@ bool AtomBrowserClient::ShouldSwapProcessesForNavigation( return true; } +std::string AtomBrowserClient::GetApplicationLocale() { + return l10n_util::GetApplicationLocale(""); +} + void AtomBrowserClient::AppendExtraCommandLineSwitches( CommandLine* command_line, int child_process_id) { diff --git a/atom/browser/atom_browser_client.h b/atom/browser/atom_browser_client.h index 89360fa9542f..8111af4727ab 100644 --- a/atom/browser/atom_browser_client.h +++ b/atom/browser/atom_browser_client.h @@ -25,6 +25,7 @@ class AtomBrowserClient : public brightray::BrowserClient { content::SiteInstance* site_instance, const GURL& current_url, const GURL& new_url) OVERRIDE; + virtual std::string GetApplicationLocale() OVERRIDE; virtual void AppendExtraCommandLineSwitches(CommandLine* command_line, int child_process_id) OVERRIDE;