Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad authored Sep 24, 2019
1 parent 3c62c5f commit 31946f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,12 @@ The middleware does basically two things:
for e.g. `/en`. The langauge is redirects to depends on the configuration keys
`detectLanguage` and `defaultLanguage` shown above.

Now in order to prevent CakePHP from complaining about missing route for `/`
Now in order to prevent CakePHP from complaining about missing route for `/`,
you must connect a route for `/` to a controller action. That controller action
will never be actually called as the middleware will intercept and redirect
the request.

For e.g. `$routes->connect('/', ['controller' => 'Foo']);`

2. When accesing any URL with language prefix it set's the app's locale based
on the prefix. For that it checks the value of `lang` route element in current
Expand Down

0 comments on commit 31946f8

Please sign in to comment.