Evas language: Fix language from locale function.
authorTom Hacohen <tom@stosb.com>
Tue, 17 Nov 2015 12:07:39 +0000 (12:07 +0000)
committerTom Hacohen <tom@stosb.com>
Tue, 17 Nov 2015 12:07:42 +0000 (12:07 +0000)
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

index c9efc3b..7d13965 100644 (file)
@@ -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;