symfony translation filter code example
Example: twig trans
# Definte default translation domain for twig file
{% trans_default_domain 'app' %}
# Translate string
{% trans %}Hello User{% endtrans %}
# Translate string with variables
{% trans with {'%name%': 'Fabien'} from 'app' %}Hello %name%{% endtrans %}
# Translate string using alternate domain and no variables
{{ translated.string.here |trans({}, 'alternate') }}