Symfony2 trans_default_domain is not working

Posted by user1069843 on Stack Overflow See other posts from Stack Overflow or by user1069843
Published on 2012-10-26T12:30:18Z Indexed on 2012/11/26 11:06 UTC
Read the original article Hit count: 650

Filed under:
|
|

At the end of http://symfony.com/doc/current/book/translation.html#twig-templates I read about

{% trans_default_domain "app" %}

to set a translation domain for a whole template. But for me it does not work. Calling

app/console translation:extract de --dir=src/ --output-dir=app/Resources/translations --output-format=xliff --keep

Just puts all messages in the messages.de.xliff file.

But if I set the domain manually for a given label like

{{ label.name|trans({}, 'app') }}

And execute the same extract command as above, then I get a new file app.de.xliff

Is there anything more to do when using trans_default_domain?

© Stack Overflow or respective owner

Related posts about symfony2

Related posts about translation