In my template, sometimes I want to make the translated string passed through upper filter. For example, I want to display “Related Links” as “RELATED LINKS”. However when I tried, e.g:
{% trans "Related links"|upper %}
TemplateSyntaxError would be thrown. Any suggestions?
Just use:
This saves the translation temporarily in a variable which then can be used to apply filters on it.
Source: https://docs.djangoproject.com/en/dev/topics/i18n/translation/#trans-template-tag