Windows: Dont override format region settings

This commit is contained in:
Philipp Hörist 2019-04-05 19:39:37 +02:00
parent cb4e60c481
commit 80f37bb3fa
1 changed files with 3 additions and 2 deletions

View File

@ -158,8 +158,9 @@ try:
if os.name == 'nt': if os.name == 'nt':
# Set the env var on Windows because gettext.find() uses it to # Set the env var on Windows because gettext.find() uses it to
# find the translation # find the translation
os.environ['LANG'] = LANG # Use LANGUAGE instead of LANG, LANG sets LC_ALL and thus
print('Found default language: %s' % LANG) # doesn't retain other region settings like LC_TIME
os.environ['LANGUAGE'] = LANG
except Exception as error: except Exception as error:
print('Failed to determine default language', file=sys.stderr) print('Failed to determine default language', file=sys.stderr)
import traceback import traceback