The mako middleware needs to come after the locale middleware in order for i18n to be available in mako templates.