I'm trying to add i18n capability to a little test project i'm working on. I'm using webapp2_extras i18n library. I have the locale folder with compiled translation .mo files created using the babel command-line. The app itself is just one simple django template and a main.py with one handler. When i'm using the gettext method right in the main I do get the translated text but strings inside the template that are wrapped with {% trans %} tag does not get translated. Here's the handler:
class MainHandler(webapp2.RequestHandler):
def get(self):
locale = self.request.GET.get('locale', 'en_US')
i18n.get_i18n().set_locale(locale)
message = i18n.gettext('Hello, world!')
self.response.out.write(template.render("templates/index.html"))
in "message" the string is translated but inside the template the same string wrappwed with {% trans %} isn't.
Thanks,