summaryrefslogtreecommitdiffstats
path: root/src/core/content_main_delegate_qt.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2015-01-12 16:39:52 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-01-13 11:37:47 +0100
commitaeb2abb6145158491e8ebe9d573df76e73c3ab13 (patch)
treec4d4573dde0b875391d8cfbeb02ea3ea219fdc03 /src/core/content_main_delegate_qt.cpp
parentbc79678dfb91648d1d31b15732f31739abe5df55 (diff)
Make Chromium use the same locale as Qt
Tell Chromium to use the locale Qt has determined as the default locale. Change-Id: I16986d84afcc0b496a22441b4a92fc09a5c89121 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'src/core/content_main_delegate_qt.cpp')
-rw-r--r--src/core/content_main_delegate_qt.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp
index e41888976..44dc0b8bd 100644
--- a/src/core/content_main_delegate_qt.cpp
+++ b/src/core/content_main_delegate_qt.cpp
@@ -52,6 +52,8 @@
#include "renderer/content_renderer_client_qt.h"
#include "web_engine_library_info.h"
+#include <QLocale>
+
static base::StringPiece PlatformResourceProvider(int key) {
if (key == IDR_DIR_HEADER_HTML) {
base::StringPiece html_data = ui::ResourceBundle::GetSharedInstance().GetRawDataResource(IDR_DIR_HEADER_HTML);
@@ -63,7 +65,7 @@ static base::StringPiece PlatformResourceProvider(int key) {
void ContentMainDelegateQt::PreSandboxStartup()
{
net::NetModule::SetResourceProvider(PlatformResourceProvider);
- ui::ResourceBundle::InitSharedInstanceWithLocale(l10n_util::GetApplicationLocale(std::string("en-US")), 0);
+ ui::ResourceBundle::InitSharedInstanceWithLocale(QLocale().name().toStdString(), 0);
// Suppress info, warning and error messages per default.
int logLevel = logging::LOG_FATAL;