diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-10-20 23:54:09 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-10-20 23:54:09 +0400 |
commit | 80d3423b00583195c94d24aacfa7d841f6a581f7 (patch) | |
tree | 6aeb9f7b1a52105aaaa7ba432078505d419233ed /source | |
parent | c1b39d346169600efd050a28d7a650a6a1fc1b74 (diff) |
Atempt to get rid of those ugly "long locales" under windows. Tested by me (win7 64, VC2008) and by Sergey. However, older OS (XP) may not work...
The idea behind this is that gettext lib has a func that mimics usual setlocale, but doing also the conversion to windows locale names. Let's hope it works everywhere!
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenfont/intern/blf_lang.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c index af2f9df3c00..e46e6be399e 100644 --- a/source/blender/blenfont/intern/blf_lang.c +++ b/source/blender/blenfont/intern/blf_lang.c @@ -42,10 +42,6 @@ #include <locale.h> -#if defined(_WIN32) -#include <windows.h> -#endif - #include "libintl.h" #include "DNA_userdef_types.h" @@ -182,8 +178,6 @@ void BLF_lang_set(const char *str) #if defined(_WIN32) && !defined(FREE_WINDOWS) { - const char *long_locale = locales[2 * U.language]; - if (short_locale) { char *envStr; @@ -196,11 +190,11 @@ void BLF_lang_set(const char *str) MEM_freeN(envStr); } - locreturn = setlocale(LC_ALL, long_locale); + locreturn = setlocale(LC_ALL, short_locale); if (locreturn == NULL) { if (G.debug & G_DEBUG) - printf("Could not change locale to %s\n", long_locale); + printf("Could not change locale to %s\n", short_locale); ok = 0; } |