getpelican/pelican — pull request #860 by avaris (2013-04-21 22:06:21+00:00)
Title: Fix for #701: adds a 'strftime' jinja fiter that uses LOCALE

This PR adds a new Jinja filter `strftime` that will solve the issue #701. Built-in `strftime` wasn't using the locale set by Pelican while rendering (probably because of some sandboxing done by Jinja).

Usage:

# settings
LOCALE = "pt_BR.utf8"

# template
{{ article.date.strftime('%B de %Y') }}
{{ article.date|strftime('%B de %Y') }}

# output
December de 2012
dezembro de 2012