Support RTL language. 43/117143/4
authorjin-gyu.kim <jin-gyu.kim@samsung.com>
Fri, 3 Mar 2017 03:58:42 +0000 (12:58 +0900)
committerJin-gyu Kim <jin-gyu.kim@samsung.com>
Tue, 14 Mar 2017 01:26:05 +0000 (18:26 -0700)
- Using 'elm_language_set' change the alignment for RTL automatically.

Change-Id: I0d5d962df0047de19d7352b0d785d0e6a60e6506

src/agent/notification-daemon/GuiRunner.cpp
src/agent/notification-daemon/main.cpp

index 1fb29cf..227241f 100644 (file)
@@ -315,17 +315,13 @@ void GuiRunner::initialize()
 void GuiRunner::setLocale()
 {
     char *lang = vconf_get_str(VCONFKEY_LANGSET);
-    char *r = setlocale(LC_ALL, lang);
-    if (!r)
-        ALOGE("setlocale failed");
     if (lang)
+    {
+        elm_language_set(lang);
         free(lang);
-    r = bindtextdomain(PROJECT_NAME, "/usr/share/locale");
-    if (!r)
-        ALOGE("bindtextdomain failed");
-    r = textdomain(PROJECT_NAME);
-    if (!r)
-        ALOGE("textdomain failed");
+    }
+    else
+        ALOGE("language_set failed.");
 }
 
 NResponseType GuiRunner::popupRun(const std::string &app, const std::string &perm)
index 6576953..d178768 100644 (file)
@@ -42,17 +42,13 @@ int main()
     using namespace AskUser::Notification;
     init_agent_log();
     char *lang = vconf_get_str(VCONFKEY_LANGSET);
-    char *r = setlocale(LC_ALL, lang);
-    if (!r)
-        ALOGE("setlocale failed");
     if (lang)
+    {
+        elm_language_set(lang);
         free(lang);
-    r = bindtextdomain(PROJECT_NAME, "/usr/share/locale");
-    if (!r)
-        ALOGE("bindtextdomain failed");
-    r = textdomain(PROJECT_NAME);
-    if (!r)
-        ALOGE("textdomain failed");
+    }
+    else
+        ALOGE("language_set failed.");
 
     try {
         AskUserTalker askUserTalker;