1

I am trying to get Flask-Babel to work with Pluggable Views. Although the @babel.localeselector annotated function gets called as expected, translation is not actually occurring.

I have set up a demo repo of my problem on GitHub: https://github.com/legeorges/flask-babel

We should be seeing "Hello" instead of "Bonjour" for the index page that uses a template and for the /hello page that just returns a String

There is a working sample app called simple-babel, however it uses Blueprint instead of Pluggable Views.

desertnaut
  • 57,590
  • 26
  • 140
  • 166
Georges
  • 195
  • 1
  • 9
  • Seems we meet the same problem..http://stackoverflow.com/questions/30171200/flask-babel-doesnt-work?noredirect=1#comment48450338_30171200 – Xiaokun May 11 '15 at 16:09
  • Thank you so much for the solution! – Georges Aug 02 '15 at 20:36
  • Possible duplicate of [Flask Babel doesn't work](https://stackoverflow.com/questions/30171200/flask-babel-doesnt-work) – nalzok Aug 14 '17 at 11:43

1 Answers1

1

Your translations folder should be under app folder!!

I met the same problem..

Xiaokun
  • 814
  • 2
  • 10
  • 26