title: flask-babel: how to translate variables
body: <p>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 <code>foo</code>.</p>
  
  <p>I try <code>{{ _(foo) }}</code>, but when I update the <code>.po</code> files like this:</p>
  
  <pre><code>pybabel extract -F babel.cfg -k lazy_gettext -o messages.pot .
  pybabel update -i messages.pot -d translations
  </code></pre>
  
  <p>nothing is displayed for translating with the content of the <code>foo</code> var.</p>
  
  <p>All is OK with constants strings, like <code>{{ _("goo")}}</code>.</p>