I'm trying to make a multi-language application with Symfony2 and I'm currently trying to use yml files for translation instead of xliff (I guess this is the default one).
Based on Symfony's documentation php, yml and xliff files are accepted.
What I am unable to find is where I must set that the translation file is a yml one.
When I delete the
messages.fr.xliff and make a
messages.fr.yml I get an exception:
[WARNING 1549] failed to load external entity "/home/ggirtsou/www/app.dev/src/ggirtsou/MyBundle/Resources/translations/messages.fr.xliff" (in n/a - line 0, column 0)
$this->get('session')->setLocale('fr'); to set the locale to French.
cache:clear- I also had to remove everything under the app/cache folder - Prisoner 2013-02-18 11:50
You need to clear the cache whenever you add or move translation files. No need to do that when just editing them.