I develops multi language web site. Pages have URI's like this:
/RU/about
/EN/about
/IT/about
/JP/about
/EN/contacts
and in jinja2 templates I write:
<a href="{{ url_for('about', lang_code=g.current_lang) }}">About</a>
I have to write lang_code=g.current_lang in all url_for
calls.
Is it possible to pass lang_code=g.current_lang
to url_for
implicitly? And write only {{ url_for('about') }}
My routers looks like:
@app.route('/<lang_code>/about/')
def about():
...