FOSUserBundle , 忽略了法语翻译[英] FOSUserBundle , French translation is ignored

本文是小编为大家收集整理的关于FOSUserBundle , 忽略了法语翻译的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我是Symfony的新用户,我目前遵循课程(全日制),我的问题:

# app/config/config.yml

framework:
    translator:      { fallback: %locale% }

app/config/parameters.ini:我设置了法语trag缩(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

但标签表单寄存器/登录名,仍在英语... 我使用版本FriendsOfSymfony-FOSUserBundle-1.2.0-0,因为最新的FriendsOfSymfony-FOSUserBundle-1.2.0-57-g72e8023

下的错误

有任何帮助吗?

推荐答案

编辑文件parameters.ini后,有必要:

  1. 断开连接(如果您已记录)
  2. 重新连接
  3. ...
  4. 重新加载 页面(/登录)如果不起作用,请清除缓存并重新加载

如果您打算自定义翻译语言,则可以复制/粘贴 vendor\bundles\FOS\UserBundle\Resources\translations在您自己的捆绑包中src\Mysite\UserBundle\Resources\translations或在app\Resources下(不要修改原始trainduction!).

本文地址:https://www.itbaoku.cn/post/2090792.html

问题描述

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 ?

推荐答案

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!).