From 31946f864ae0523f0879db0a5e5d5fe194d0b1f2 Mon Sep 17 00:00:00 2001 From: ADmad Date: Tue, 24 Sep 2019 17:58:19 +0530 Subject: [PATCH] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c18097e..558ee79 100644 --- a/README.md +++ b/README.md @@ -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