I am using flask-babel for translating a Flask-based web application. I really want to know how can I translate the content of a variable, say foo
.
I try {{ _(foo) }}
, but when I update the .po
files like this:
pybabel extract -F babel.cfg -k lazy_gettext -o messages.pot .
pybabel update -i messages.pot -d translations
nothing is displayed for translating with the content of the foo
var.
All is OK with constants strings, like {{ _("goo")}}
.