I've read tons of answers and tutorials about Symfony 2 translation, but i'm still not getting it to work. No errors are shown, but messages are not translated in twig templates (nor by testing $this->get('translator')->trans('...') ). The xliff file seems to be loaded because if i add a wrong character on purpose the markup Symfony throws me an error.
Here is my setup :
app/Resources/translations/messages.en.xliff
config.yml
translator: { fallback: "%locale%" }
...
default_locale: "%locale%"
parameters.yml
locale: en
Contents of messages.en.xliff
<?xml version="1.0"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" datatype="plaintext" original="file.ext">
<body>
<trans-unit id="1">
<source>test.message</source>
<target>TRANSLATED TEST</target>
</trans-unit>
</body>
</file>
</xliff>
It still does not work even after runing
php app/console cache:clear
And in my twig template (it's a included template...)
{{ "test.message"|trans }}
Any idea ? PS: I don't have other Bundles installed appart from the liip-imagine Bundle. Any help would be strongly appreciated !