flask_babel flash doesn't update in GAE in production

45 Views Asked by At

I'm implementing i18n with flask_babel like below and it works in local server. However it doesn't work in production after deploy. It can show translated with "_('English')", however it does show {{ _('English')}} as is in HTML. Is there any way to show an appropriate message in HTML?

[main.py]

from flask_babel import gettext as _

@app.route('/', methods=['GET'])
def root():
    flash(_('English'), 'success')
    return render_template('index.html')

[index.html]

<!doctype html>
<html>
  <head>
  </head>
  <body>
    {{ _('English')}}
  </body>
</html>
0

There are 0 best solutions below