From c9e5d8e142aa02dfeffe1d31ff819fffd899ae5a Mon Sep 17 00:00:00 2001 From: Cho Woong Suk Date: Tue, 1 Aug 2017 18:28:14 +0900 Subject: [PATCH] temporal patch for setting LANG environment value Change-Id: I0999f2ef62119d9d1d6278d09be915399ba6b0a1 --- NativeLauncher/launcher/dotnet/dotnet_launcher.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc index 6adff4b..b268357 100644 --- a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc +++ b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc @@ -21,6 +21,8 @@ #include #include +#include + #include "utils.h" #include "log.h" #include "launcher.h" @@ -288,8 +290,27 @@ void CoreRuntime::dispose() _DBG("Dotnet runtime disposed"); } +static void setLang() +{ + char *lang; + lang = vconf_get_str(VCONFKEY_LANGSET); + if (lang) { + _DBG("setenv for language setting : %s", lang); + setenv("LANG", lang, 1); + setenv("LC_MESSAGES", lang, 1); + } +} + int CoreRuntime::launch(const char* appId, const char* root, const char* path, int argc, char* argv[]) { + // temporal patch to set LANG for coreclr. + // below code will be removed after applying appfw patch. + setLang(); + + vconf_notify_key_changed(VCONFKEY_LANGSET, [](keynode_t* node, void* user_data) { + setLang(); + }, NULL); + if (path == nullptr) { _ERR("executable path is null"); return 1; -- 2.7.4