LocaleBundle icon indicating copy to clipboard operation
LocaleBundle copied to clipboard

Please help out with the docs

Open r0ssIV opened this issue 12 years ago • 2 comments

Could you extend the documentation with the following.

Saying, we have urls like http://domain.com/{_locale}/dashboard,

what is the right way to impement redirect from http://domain.com (root) to http://domain.com/{_locale}/someurl, where {_locale} is locale guessed by Lunetics guesseres.

I really lack this explanation in the docs. Guess this is done in routing.yml.

Many thanks.

r0ssIV avatar Jul 10 '13 05:07 r0ssIV

Any updated on this? Some pointers would be greatly appreciated.

peschee avatar Mar 04 '14 19:03 peschee

in the symfony cmf, we do it like this:

home_redirect:
  pattern: /
  defaults:
    _controller: lunetics_locale.switcher_controller:switchAction
    route: someurl
    statusCode: 301
    useReferrer: false

someurl would be the route name to your dashboard or whatever you want the homepage to be.

does that make sense? anybody wants to do a PR to update the docs with this bit of information?

dbu avatar Oct 25 '14 15:10 dbu