husstanden/filters.py

8 lines
224 B
Python
Raw Normal View History

from flask import render_template
from objects import glob
2019-05-10 09:36:45 +02:00
@glob.app.context_processor
def locale():
def _locale(lang, key):
return glob.langs[lang][key] if key in glob.langs[lang] else key
return dict(locale = _locale)