From 90b1ca01336a649bc742e3c0fcc3ebfeff81854f Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 16 Aug 2017 14:05:12 +0900 Subject: [PATCH] Fix the fallback about setlocale Change-Id: I9f647318f8937fadd1260abb2f94237a3f6b6cb3 Signed-off-by: Hwankyu Jhun --- src/widget-i18n.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widget-i18n.c b/src/widget-i18n.c index 39ae5c5..eafb8ed 100755 --- a/src/widget-i18n.c +++ b/src/widget-i18n.c @@ -43,16 +43,16 @@ void _update_lang(void) setenv("LANGUAGE", language, 1); setenv("LANG", lang, 1); setenv("LC_MESSAGES", lang, 1); + free(lang); r = setlocale(LC_ALL, ""); if (r == NULL) { /* LCOV_EXCL_START */ - r = setlocale(LC_ALL, lang); + r = setlocale(LC_ALL, "en_US"); if (r) _D("*****appcore setlocale=%s\n", r); /* LCOV_EXCL_STOP */ } - free(lang); } else { _E("failed to get current language for set lang env"); /* LCOV_EXCL_LINE */ } -- 2.7.4