Index: content/ppapi_plugin/ppapi_plugin_main.cc |
diff --git a/content/ppapi_plugin/ppapi_plugin_main.cc b/content/ppapi_plugin/ppapi_plugin_main.cc |
index ed6897788717739452b8da4b550fad28bcaea45a..ec4d6b5fd9419a9674d302cf1e75bb74f855ce49 100644 |
--- a/content/ppapi_plugin/ppapi_plugin_main.cc |
+++ b/content/ppapi_plugin/ppapi_plugin_main.cc |
@@ -2,6 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include <stdlib.h> |
+ |
#include "base/command_line.h" |
#include "base/debug/debugger.h" |
#include "base/i18n/rtl.h" |
@@ -53,6 +55,9 @@ int PpapiPluginMain(const content::MainFunctionParams& parameters) { |
if (command_line.HasSwitch(switches::kLang)) { |
std::string locale = command_line.GetSwitchValueASCII(switches::kLang); |
base::i18n::SetICUDefaultLocale(locale); |
+ std::replace(locale.begin(), locale.end(), '-', '_'); |
+ setlocale(LC_ALL, locale.c_str()); |
+ setenv("LANG", locale.c_str(), 0); |
brettw
2012/10/12 05:50:53
Can you add a comment about why this is needed?
Scott Hess - ex-Googler
2012/10/12 06:15:05
Done. I'll poke around tomorrow morning and see i
|
} |
MessageLoop main_message_loop; |