Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

[Firewall] No routing and locale support #267

Open
PierrickMartos opened this issue Jun 7, 2013 · 3 comments
Open

[Firewall] No routing and locale support #267

PierrickMartos opened this issue Jun 7, 2013 · 3 comments

Comments

@PierrickMartos
Copy link

Hi,

When i add {_locale} to the parameter : default_target_path the locale argument isn't load. For example, instead of having this url : /fr/app/ i have : %7B_locale%7D/app/

This bug seems to be fixed in symfony, see this issue : symfony/symfony#861 but doesn't seems to work with FOSFacebookBundle.

fos_facebook:
     login_path:          /
     check_path:          /facebook/login-check
     default_target_path: /{_locale}/app/
     provider:            my_fos_facebook_provider
@abenbachir
Copy link

do this :
default_target_path: /%locale%/app/

and make sure you have in your config.yml the default_locale
framework:
....
default_locale: "%locale%"

@PierrickMartos
Copy link
Author

Thanks for your answer but this only work if i want to set the default locale. I want to change the default_target_path with the user locale.

@stof
Copy link
Member

stof commented Jun 16, 2013

use a route name when you want it to be dynamic

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

No branches or pull requests

3 participants