Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I want to use the fosuser registration form on different urls for different languages. Like for example /en/register and /de/registrierung.

# app/config/routing.yml

fos_user_register_de:
    pattern: /de/registrierung
    defaults: { _controller: FOSUserBundle:Registration:register }
    methods: [GET,POST]
    requirements:
        _locale: de

fos_user_register_en:
    pattern: /en/registration
    defaults: { _controller: FOSUserBundle:Registration:register }
    methods: [GET,POST]
    requirements:
        _locale: en

On submit of the form I get an error because the route name is not "fos_user_registration_register". Same thing on the confirmation.

Is there a way to do this without using a bundle like PUGXMultiUserBundle?

share|improve this question
Why two routes? Can be combined as one. And can you copy the whole error message into the question? 'cause the RegistrationController should not check how the route is named. – Pazi Jul 12 at 15:56
How would I do that? How would I combine those two urls in one pattern? – Christian 22 hours ago
pattern: /{_locale}/registration normally, but I didn't saw the translation on registration. But there's also a solution, the JMSI18nRoutingBundle – Pazi 22 hours ago

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.