From da41244b8b4dcb24e984c431defadc64958fb0da Mon Sep 17 00:00:00 2001 From: Ben Constable Date: Tue, 7 Jun 2016 22:17:20 +0100 Subject: [PATCH] Update readme with note on stack determiner --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3657d5d..45152a8 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ protected $middleware = [ ``` It's recommended to set this middleware globally and early in the stack, but you're -free to register it in whatever way that suits you needs. +free to register it in whatever way that suits your needs. ###Configuration @@ -111,6 +111,23 @@ change this using the `cookie` configuration option. This determiner sets the application locale from a session value called `locale`. You can change this using the `session` configuration option. +###Using multiple determiners + +Sometimes it might be useful to try and determine the locale from more than one +source. If you'd like to do this, just set the `driver` configuration option to an +array of other driver names. For example: + +```php +'driver' => [ + 'cookie', + 'parameter' +] +``` + +The locale will then be deteremined from whichever determiner first provides a +successful match, so make sure you add the drivers in the correct order (earliest +in the array will be used first). + ###Determining the locale outside of middleware You don't have to use the provided middleware if you don't want to. You can