symfony - Translations doesn't work -
i'm using symfony2.6 , catalogue of translation doesn't work
message.en.yml
#src/appbundle/resources/translations/message.en.yml app: menu: home: home
message.fr.yml
#src/appbundle/resources/translations/message.fr.yml app: menu: home: accueil
and twig
{{ 'app.menu.home'|trans }}
this output
app.menu.home
your translation namespace not correct (the final s of message missing), files should named:
#src/appbundle/resources/translations/messages.en.yml #src/appbundle/resources/translations/messages.fr.yml
or call trans helper message
namespace:
{{ 'app.menu.home'|trans({},'message') }
Comments
Post a Comment