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

New strategy #117

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

New strategy #117

wants to merge 6 commits into from

Conversation

lughino
Copy link

@lughino lughino commented Dec 6, 2013

Hi,
my purpose is to create a new strategy, which enables it to stand as a strategy prefix_except_default but I have a listener to set the route according to the local user set. (such as the strategy of prefix)
eg.

default local: en
locales [en, fr]
a user with local fr accessed on www.example.com and is redirected to www.example.com/fr.
While a user with local en or with local different from locales accesses www.example.com.

At the moment I can't understand why it doesn't work.
I tried to put a var_dump inside the new listener, but it seems that does not join it.
It works exactly like the strategy of "prefix_except_default" ..

Can you tell me what is wrong or if you could do what I want?

Thanks

@andrejsramko
Copy link

does this work already? how does the bundle "detect" user's locale?
what about using something like this when user does not choose the locale explicitely?
$this->defaultLocale = $request->getPreferredLanguage();

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

Successfully merging this pull request may close these issues.

2 participants