set locale 20/17520/1
authorHaifeng Deng <haifeng.deng@samsung.com>
Mon, 2 Sep 2013 06:45:13 +0000 (14:45 +0800)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 7 Mar 2014 02:24:13 +0000 (11:24 +0900)
Change-Id: I7f3c33f3c5830199e1d50e9985156c344b6cebdb

ism/extras/efl_panel/isf_panel_efl.cpp
ism/src/Makefile.am
ism/src/scim_launcher.cpp

index ab6a5f4..a3f104c 100644 (file)
@@ -2314,7 +2314,7 @@ static void efl_get_screen_resolution (int &width, int &height)
     static Evas_Coord scr_w = 0, scr_h = 0;
 
     if (scr_w == 0 || scr_h == 0) {
-        uint w, h;
+        uint w = 0, h = 0;
         if (efl_get_default_zone_geometry_info (ecore_x_window_root_first_get (), NULL, NULL, &w, &h)) {
             scr_w = w;
             scr_h = h;
@@ -4475,7 +4475,7 @@ int main (int argc, char *argv [])
     _read_handler_list.push_back (panel_agent_read_handler);
     check_time ("run_panel_agent");
 
-    display_language_changed_cb (NULL, NULL);
+    set_language_and_locale ();
 
 #if HAVE_VCONF
     /* Add callback function for input language and display language */
index 5dbd494..9f8eafc 100644 (file)
@@ -180,8 +180,8 @@ libexec_PROGRAMS        = scim-launcher scim-helper-launcher
 
 scim_launcher_SOURCES  = scim_launcher.cpp
 scim_launcher_LDADD    = libscim@SCIM_EPOCH@.la
-scim_launcher_CXXFLAGS  = @PRIVILEGE_CONTROL_CFLAGS@
-scim_launcher_LDFLAGS  = @LTLIBINTL@ @PRIVILEGE_CONTROL_LIBS@
+scim_launcher_CXXFLAGS  = @PRIVILEGE_CONTROL_CFLAGS@ @VCONF_CFLAGS@
+scim_launcher_LDFLAGS  = @LTLIBINTL@ @PRIVILEGE_CONTROL_LIBS@ @VCONF_LIBS@
 
 scim_helper_launcher_SOURCES   = scim_helper_launcher.cpp
 scim_helper_launcher_CXXFLAGS  = @PRIVILEGE_CONTROL_CFLAGS@
index e512c03..cf7bed0 100644 (file)
@@ -41,6 +41,7 @@
 #include <unistd.h>
 #include <signal.h>
 #include <privilege-control.h>
+#include <vconf.h>
 #include "isf_query_utility.h"
 
 using namespace scim;
@@ -228,6 +229,16 @@ int main (int argc, char *argv [])
         // Create folder for saving engine list
         scim_make_dir (USER_ENGINE_LIST_PATH);
 
+        char *lang_str = vconf_get_str (VCONFKEY_LANGSET);
+        if (lang_str) {
+            setenv ("LANG", lang_str, 1);
+            setlocale (LC_MESSAGES, lang_str);
+            free (lang_str);
+        } else {
+            setenv ("LANG", "en_US.utf8", 1);
+            setlocale (LC_MESSAGES, "en_US.utf8");
+        }
+
         /* create backend */
         backend = new CommonBackEnd (config, engine_list);
         gettime (clock_start, "Create backend");