Is it possible to check if given variable is string in Twig ?
Twig
Expected solution:
messages.en.yml:
messages.en.yml
hello: stranger
Ok, I did it with:
{% if title[0] is not defined %} {{ title|trans }} {% else %} {{ title[0]|trans(title[1]) }} {% endif %}
Ugly, but works.