Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r--source/blender/blenfont/intern/blf_lang.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c
index 3547e5095e2..581a936ee87 100644
--- a/source/blender/blenfont/intern/blf_lang.c
+++ b/source/blender/blenfont/intern/blf_lang.c
@@ -150,9 +150,10 @@ void BLF_lang_set(const char *str)
{
const char *locale;
static char default_locale[64]="\0";
+ static char *env_language = getenv("LANGUAGE");
- if(default_locale[0]==0) /* store defaul locale */
- strncpy(default_locale, getenv("LANGUAGE"), sizeof(default_locale));
+ if(default_locale[0]==0 && env_language!=NULL) /* store defaul locale */
+ strncpy(default_locale, env_language, sizeof(default_locale));
if(short_locale[0])
locale= short_locale;