php - Symfony2 didn't display my translation -


i have problem when use symfony translator. followed doc of symfony2 translator , created repertory => mybundle/platformbundle/ressources/translations , in translations have created file => messages.fr.yml: hello: bonjour have twig that:

<html>   <body>     {{ 'hello'|trans }} {{ name }}!     <p> sonate cest cool mais la trad sa lest deja moins </p>   </body> </html> 

and have conf config.yml doc say.

unfortunately, it's doesn't work , don't understand why ?

if have followed french official doc translation maybe have set translator in config.yml :

framework:     translator: { fallback: en } 

try this:

framework:     translator: { fallback: fr } 

or better : framework: translator: { fallback: "%locale%" }

and in last case, edit app/config/parameters.yml , specify default locale :

parameters:     locale: fr 

if not sufficient, verify directory mybundle/platformbundle/ressources/translations correct.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -