How to overwrite FOS user bundle form labels

后端 未结 2 2154
忘掉有多难
忘掉有多难 2021-02-13 21:14

I have a hard time overwriting labels that the FOS user bundle for Symfony2 uses.

I\'m already overwriting the Form class, but there is no option for elements like \"set

2条回答
  •  情歌与酒
    2021-02-13 21:20

    As already said you can put your translations files in :
    app/Resources/translations

    But if you override it in your parent bundle (src/MyAppBundle/Resources/translations) or in any other bundle, make sure to load your bundle after the overridden bundle in your Kernel :

    public function registerBundles()
    {
        $bundles = [
            ...
            new FOS\UserBundle\FOSUserBundle(),
            new MyAppBundle\MyAppBundle(),
            ...
        ];
    ...
    }
    

提交回复
热议问题