I have two questions, one is about name of tag in Twig code syntax, and other one is about how to modify this tag.
Tag: {{ 'Some text' }} or {{ "Some text" }}
In both examples it will display “Some text”, but I want to use my function (translate() ) before display. I don’t know where I should search in code, because I don’t even know name this tag.
I want to translate parsed text before display, e.g.: {{ 'Some text' }} -> <?php echo translate('Some text'); ?>
Make your own
Twig extenstion. Tutorial is available here. It’s the most elegant way.Extension:
Template: