From: Cho Woong Suk Date: Tue, 1 Aug 2017 09:28:14 +0000 (+0900) Subject: temporal patch for setting LANG environment value X-Git-Tag: accepted/tizen/4.0/unified/20170816.015310^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F55%2F141755%2F2;p=platform%2Fcore%2Fdotnet%2Flauncher.git temporal patch for setting LANG environment value Change-Id: I0999f2ef62119d9d1d6278d09be915399ba6b0a1 --- 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;