Calling `locale.getlocale()` checks LC_CTYPE, which is not meant for
UI strings. Change the call to check LC_MESSAGES instead.
Also call `locale.setlocale()` first to import the locale settings
from the environment. This is not needed for LC_CTYPE due to
https://bugs.python.org/issue6203 but is required for LC_MESSAGES.
Closes #361
- default_locale = locale.getlocale()[0]
+ locale.setlocale(locale.LC_MESSAGES, '')
+ default_locale = locale.getlocale(locale.LC_MESSAGES)[0]
if default_locale is None:
self.language = "en-US"
else:
if default_locale is None:
self.language = "en-US"
else: