I've got a generic newsletter template. Now some of our newsletters are in Spanish. It's overkill and more complicated for the admins to bother with settings up different locales, so instead I'd like to set the locale from the entry (currently using a dropdown).
All good, and I can use the |translate(language="") filter to achieve this using the value from the dropdown field.
Now the problem is that when formatting a date, it remains in English because it translated using the current locale, which is English.
I'm wondering whether I can manually override the locale in the template. {% set locale = 'es' %}
or something.
Or if I can force the date to format using a specific locale.
Cheers.