Allow configuring of automatic localization. Closes #1747

This commit is contained in:
James Brooks
2016-05-05 10:41:42 +01:00
parent 9ddf9e3e1a
commit 47e1dff5c5
4 changed files with 19 additions and 1 deletions
+5
View File
@@ -55,6 +55,11 @@ class Localize
*/
public function handle(Request $request, Closure $next)
{
// Early exit optimization.
if (!$this->config->get('setting.automatic_localization')) {
return $next($request);
}
$supportedLanguages = $request->getLanguages();
$userLanguage = $this->config->get('app.locale');