diff --git a/src/i18n.py b/src/i18n.py index 06acb25..422d58f 100644 --- a/src/i18n.py +++ b/src/i18n.py @@ -4,9 +4,10 @@ from pathlib import Path from src.pluginregistry import PluginRegistry from src.settings.settingsstore import SettingsStore +from locale import getlocale settings = SettingsStore.load() -locale = os.environ['LANG'] if 'LANG' in os.environ and os.environ['LANG'] else "en" +locale = getlocale()[0] locale = settings.session.get('general', 'lang', fallback=locale) _ = False @@ -24,4 +25,3 @@ if not _: _ = gettext.gettext ngettext = gettext.ngettext PluginRegistry.execute("set_locale", '') - print('No translation found')