diff options
Diffstat (limited to 'src/jwebmail')
-rw-r--r-- | src/jwebmail/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jwebmail/__init__.py b/src/jwebmail/__init__.py index 96b6ee2..7bc1093 100644 --- a/src/jwebmail/__init__.py +++ b/src/jwebmail/__init__.py @@ -68,7 +68,7 @@ def create_app(): validate_config(app) - Babel(app, locale_selector=lambda: g.get("lang_code")) + babel = Babel(app, locale_selector=lambda: g.get("lang_code")) app.cli.add_command(compile_css_command) @@ -93,7 +93,7 @@ def create_app(): if "lang_code" in values: return if app.url_map.is_endpoint_expecting(endpoint, "lang_code"): - values["lang_code"] = g.get("lang_code", app.config["BABEL_DEFAULT_LOCALE"]) + values["lang_code"] = g.get("lang_code", babel.default_locale.language) @app.url_value_preprocessor def pull_lang_code(endpoint, values): |