0
嗨我使用FOSUserBundle與SonataUserBundle的路由。哪些是英文的。 我想用法語翻譯它們。FOSUserBundle翻譯路由名稱
我做了修改routing.yml
sonata_user_resetting:
resource: "@SonataUserBundle/Resources/config/routing/sonata_resetting_1.xml"
prefix: /reset
sonata_user_profile:
resource: "@SonataUserBundle/Resources/config/routing/sonata_profile_1.xml"
prefix: /mon-compte
sonata_user_register:
resource: "@SonataUserBundle/Resources/config/routing/sonata_registration_1.xml"
prefix: /inscription
sonata_user_change_password:
resource: "@SonataUserBundle/Resources/config/routing/sonata_change_password_1.xml"
prefix: /mon-compte
sonata_user:
resource: '@SonataUserBundle/Resources/config/routing/admin_security.xml'
prefix: /admin
sonata_user_admin_security:
resource: '@SonataUserBundle/Resources/config/routing/admin_security.xml'
prefix: /admin
sonata_user_admin_resetting:
resource: '@SonataUserBundle/Resources/config/routing/sonata_resetting_1.xml' # et non 'admin_resetting.xml' : erreur dans la doc
prefix: /admin/reset
但我不明白,我可以配置/登錄路由。
你有想法嗎?
編輯:
我AppKernel.php
$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new FM\AppBundle\AppBundle(),
new FOS\UserBundle\FOSUserBundle(),
// These are the other bundles the SonataAdminBundle relies on
new Sonata\CoreBundle\SonataCoreBundle(),
new Sonata\BlockBundle\SonataBlockBundle(),
new Knp\Bundle\MenuBundle\KnpMenuBundle(),
// Storage and SonataAdminBundle
new Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle(),
new Sonata\AdminBundle\SonataAdminBundle(),
new Sonata\EasyExtendsBundle\SonataEasyExtendsBundle(),
new Sonata\UserBundle\SonataUserBundle('FOSUserBundle'),
new Application\Sonata\UserBundle\ApplicationSonataUserBundle(),
);
的Application\Sonata\UserBundle\ApplicationSonataUserBundle
是我的託管用戶實體的捆綁。
當我創建新的路徑它的工作原理。但是路由登錄仍然可用,即使我使用'login_path:/ my-new-name'在security.yml中更改路由名稱 – Kevin
首先確保您的bundle在FOSUserBundle後初始化(然後它應該覆蓋之前的路由這個同名)。 –
我做到了,我編輯了我的POST。但仍然是同樣的問題。 – Kevin