From 14fb0857665e353f4a2155c5c4807c2a77c17785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Sat, 19 Jan 2019 19:36:50 +0100 Subject: [PATCH] Windows: Fix language detection --- gajim/common/i18n.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gajim/common/i18n.py b/gajim/common/i18n.py index 51009c3d6..5e81af36e 100644 --- a/gajim/common/i18n.py +++ b/gajim/common/i18n.py @@ -155,6 +155,10 @@ except locale.Error as error: try: LANG = get_default_lang() + if os.name == 'nt': + # Set the env var on Windows because gettext.find() uses it to + # find the translation + os.environ['LANG'] = LANG print('Found default language: %s' % LANG) except Exception as error: print('Failed to determine default language')