Force lang session

This commit is contained in:
Emily 2019-05-12 15:24:20 +01:00
parent 01ca13305c
commit 3a1137561d

View File

@ -12,6 +12,9 @@ LANGUAGES = {
@babel.localeselector
def get_locale():
# force session lang to be set
session["lang"] = session.get("lang", "en")
if request.args.get("lang"):
session["lang"] = request.args.get("lang") if request.args.get("lang") in LANGUAGES.keys() else "en"
return session.get("lang", "en")