def lang(code):
"""
Changes the language of the app for a given session
:param code: the language code (e.g: pt-BR)
:return: just a generic String (it is mandatory to return something in route functions)
"""
if code in LANGUAGES:
session['lang'] = code
return 'Changed language to: ' + code
评论列表
文章目录