gouthambs / Flask-Blogging

A Markdown Based Python Blog Engine as a Flask Extension.
http://flask-blogging.readthedocs.org/en/latest/
MIT License
692 stars 160 forks source link

Add internationalization support #50

Open gouthambs opened 8 years ago

slippers commented 8 years ago

here is some research on this issue.

pybabel extends the python gettext module. Flask-Babel extends this functionality into flask.

how it works:

add flask_babel to your app. then wrap the strings into a babel function call. finally run the pybabel to scan your app and create translation files.

areas of change for flask_blogging

what it will not do

other

what happens when flask_babel is applied multiple times to the app object. if flask_blogging is part of a larger web application that is already registering flask_babel then would there be an issue? maybe create a set of proxy functions that would call into babel if it is loaded on the app.