make language changeable

This commit is contained in:
2022-02-02 20:04:50 +01:00
parent 9c28a41904
commit 2d21de0e43
5 changed files with 30 additions and 22 deletions

View File

@@ -2,7 +2,11 @@ import gettext
import os
from pathlib import Path
from settingsstore import SettingsStore
settings = SettingsStore.load()
locale = os.environ['LANG'] if os.environ['LANG'] else "en"
locale = settings.session.get('general', 'lang', fallback=locale)
_ = False
src_dir = Path(__file__).resolve().parent.parent