On symfony3, I implement a custom form (no FosUserBundle is used on purpose because I go PDO instead of ORM to manage my DB).
On that form I want error message to be displayed.
It does work but use the default "translators.[lang].xlf" file which is under the folder: [MyProject]\vendor\symfony\symfony\src\Symfony\Component\Validator\Resources\translations.
I added a "validators.[lang].yml" file under the directory: [MyProject]\src\[MyBundle]\Resources\translations: It doesn't work. I have some "messages.[lang].yml" files under that same directory and those work.
So I guess that I am missing something to have the "validators.[lang].yml" under "MyBundle" being recognized.
I see that in the symfony translation cookbook describes a way to add some extra catalog, but I don't get where it is supposed to be done -which file under which symfony folder?
I would have thought that this could have been automated as soon as a validators.[lang].yml file had been placed under the directory [MyProject]\src[MyBundle]\Resources\translations, or a setting to do in the config.yml.
Does anyone have an experience to share about that?
My bad...
After I had added "validators.[lang].yml" file under the directory: [MyProject]\src[MyBundle]\Resources\translations.
I should have done a "[MyProject]\ php bin/console cache:clear".
It is explained here: http://symfony.com/doc/current/book/translation.html#book-translation-resource-locations
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments