FOSUserBundle , French translation is ignored

ε祈祈猫儿з 提交于 2019-12-21 20:46:13

问题


I am a new user of symfony I currently following a course( full time), My problem :

# app/config/config.yml

framework:
    translator:      { fallback: %locale% }

app/config/parameters.ini: I set up the French traduction(fr):

; These parameters can be imported into other config files
; by enclosing the key with % (like %database_user%)
; Comments start with ';', as in php.ini
[parameters]
    database_driver   = pdo_mysql
    database_host     = localhost
    database_port     =
    database_name     = blog
    database_user     = root
    database_password =

    mailer_transport  = smtp
    mailer_host       = localhost
    mailer_user       =
    mailer_password   =

    locale            = fr

    secret            = ThisTokenIsNotSoSecretChangeIt

but labels forms register / login, is still in English... I use version FriendsOfSymfony-FOSUserBundle-1.2.0-0 , because of bug under the latest FriendsOfSymfony-FOSUserBundle-1.2.0-57-g72e8023

Any help please ?


回答1:


After editing the file parameters.ini, it is necessary to:

  1. disconnect(if you been logged)
  2. reconnect
  3. ...
  4. reload the page(/login) if it does not work, then clear the Cache and reload

if you plan to customize the translated language , you may to copy/paste the vendor\bundles\FOS\UserBundle\Resources\translations in your own Bundle src\Mysite\UserBundle\Resources\translations Or under app\Resources (don't modify the original traduction!).



来源:https://stackoverflow.com/questions/11108075/fosuserbundle-french-translation-is-ignored

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!