]> sjero.net Git - linphone/blobdiff - gtk/support.c
update translation files(de,he,ru) and fix the language choice for linux
[linphone] / gtk / support.c
index 227d5b42cfcbd8ca238ebfcd2e3ae08025febe7f..de6c3a910b5eba48691404259bf9e61cc600985e 100644 (file)
@@ -156,7 +156,11 @@ const char *linphone_gtk_get_lang(const char *config_file){
 void linphone_gtk_set_lang(const char *code){
        LpConfig *cfg=linphone_core_get_config(linphone_gtk_get_core());
        const char *curlang;
-       curlang=getenv("LANG");
+       #if defined(WIN32) || defined(__APPLE__)
+               curlang=getenv("LANG");
+       #else
+               curlang=getenv("LANGUAGE");
+       #endif
        if (curlang!=NULL && strncmp(curlang,code,2)==0) {
                /* do not loose the _territory@encoding part*/
                return;
@@ -166,8 +170,10 @@ void linphone_gtk_set_lang(const char *code){
        char tmp[128];
        snprintf(tmp,sizeof(tmp),"LANG=%s",code);
        _putenv(tmp);
-#else
+#elif __APPLE__
        setenv("LANG",code,1);
+#else 
+       setenv("LANGUAGE",code,1);
 #endif
 }