Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having 2 strategies ? #225

Open
ludovicpages opened this issue Jul 4, 2018 · 0 comments
Open

Having 2 strategies ? #225

ludovicpages opened this issue Jul 4, 2018 · 0 comments

Comments

@ludovicpages
Copy link

I'm using JMSI18nRoutingBundle with symfony 2.8 and i'm having a problem. I have one host per language, so my config.yml looks like this :

jms_i18n_routing:
    default_locale: fr
    locales: [fr, en]
    strategy: custom
    hosts:
        fr: foo.fr
        en: foo.en
    redirect_to_host: false

With this no problem, works has expected. I also have some entities that i made Translatable with the help of stof_doctrine_extensions behind the admin url.

And here comes the problems. I want the admin section to be in the foo.fr domain (main domain). So i need, some urls like :

foo.fr/fr/admin/post/edit/1
foo.fr/en/admin/post/edit/1

See what my problem is ? With the host strategy, the locale on foo.fr will always be FR, and it's i guess the normal behaviour. But i need somehow, to be able to override the locale on the main domain for some URLs.

Any idea how i can achieved that ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant