localizationinternationalizationjinja2pelicanpython-babel

Jinja2 does not recognize translation


I am building a site with Pelican and following this guide on localizing templates.

However, pelican output tells me: "ERROR: Cannot find translations for language 'en' in 'translations/' with domain 'flobin'. Installing NullTranslations." when I run the pelican command (more here.)

This is my directory structure on the left, which I think is the correct structure.

I have installed Babel.

What’s going wrong?


Solution

  • Turns out the conflict was with the following line in my pelicanconf.py:

    I18N_GETTEXT_LOCALEDIR = 'translations/'

    Removing it completely fixed the issue.