Category Archives: babel

Internationalization (i18n) not rendered using flask-babel and apache with mod_wsgi on Ubuntu instance

I have a web application developed using python 2.7.6, flask and deployed on a Apache Ubuntu server.

For internationalization, the app uses the flask-babel package in order to translate into Thai. However, it seems that my translations/th/LC_messages/messages.po file is ignored.

It works perfectly in my localhost but not in the server. To force the selection of the locale, I use the code below:

def get_locale():
    return 'th'

It seems there is something that might be missing in my configuration file but couldn't figure it out.

If you have any ideas please feel free. Thank you.