tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8fcf9a0fe6e4dc3942cb42ec3c0f28d63d6cf694

commit 8fcf9a0fe6e4dc3942cb42ec3c0f28d63d6cf694
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Nov 17 12:07:39 2015 +0000

    Evas language: Fix language from locale function.
    
    This function was trying to infer from the LANG env var, though it should
    have just queried the locale all along, as the language we want is the
    system's text language, and not necessarily the LANG variable's value.
    
    @fix.
---
 src/lib/evas/common/language/evas_language_utils.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/common/language/evas_language_utils.c 
b/src/lib/evas/common/language/evas_language_utils.c
index c9efc3b..7d13965 100644
--- a/src/lib/evas/common/language/evas_language_utils.c
+++ b/src/lib/evas/common/language/evas_language_utils.c
@@ -21,6 +21,7 @@
 #endif
 
 #include <stdlib.h>
+#include <locale.h>
 
 #include <Eina.h>
 
@@ -134,7 +135,7 @@ evas_common_language_from_locale_get(void)
    if (*lang) return lang;
 
    const char *locale;
-   locale = getenv("LANG");
+   locale = setlocale(LC_MESSAGES, NULL);
    if (locale && *locale)
      {
         char *itr;

-- 


Reply via email to