I found this part of code in the documentation

{% set title = "Cocktail Recipes"|t %}

What does |t mean there?

  • And I was actually looking for the syntax on how to translate something in a set statement ;) glad I found this! – outline4 Sep 3 '14 at 19:34

It's the short syntax for the translate filter. Set up a translation file as described in the docs and the string you apply that filter to is translated according to it.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.