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

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

excel vba - VBA Proxy auto-configuration for http requests -

php - phpWord - Tables with borders in headers/footers -