Symfony translations not working
In Symfony 3.0 I had to clear the cache:
php bin/console cache:clear
I see you already did that, maybe it helps other like me.
Have you enabled the Translator service in your config file?
framework: translator: { fallbacks: en }
The language catalogue is created in your cache folder irrespective of whether your translator is enabled or not.
Did you try translating in your controller?
$trans = $this->get('translator')->trans('message');
Try to specify domain. If you not specify domain by default it a messages.
{{ 'message'|trans({}, 'some_domain') }}
Then translations can be found in
- the kernel root directory/Resources/translations directory;
- the kernel root directory/Resources/bundle name/translationsdirectory;
- the Resources/translations/ directory of the bundle.
For example some_domain.fr.yml
. Last step is to configure your locale. You can get current locale from request with $request->getLocale()
P.S. try to rm -r app/cache
to make sure that the cache is deleted