temporal patch for setting LANG environment value 55/141755/2 accepted/tizen/4.0/unified/20170816.015310 accepted/tizen/4.0/unified/20170829.020105 accepted/tizen/unified/20170802.151307 submit/tizen/20170801.093330 submit/tizen/20170802.003242 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170814.115522 submit/tizen_4.0/20170828.100004 submit/tizen_4.0/20170828.110004 submit/tizen_4.0_unified/20170814.115522
authorCho Woong Suk <ws77.cho@samsung.com>
Tue, 1 Aug 2017 09:28:14 +0000 (18:28 +0900)
committerCho Woong Suk <ws77.cho@samsung.com>
Tue, 1 Aug 2017 09:30:29 +0000 (18:30 +0900)
Change-Id: I0999f2ef62119d9d1d6278d09be915399ba6b0a1

NativeLauncher/launcher/dotnet/dotnet_launcher.cc

index 6adff4b..b268357 100644 (file)
@@ -21,6 +21,8 @@
 #include <fstream>
 #include <vector>
 
+#include <vconf.h>
+
 #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;