From 4306eaa00e418b2dea94d91f83ba3a2c54514428 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 6 May 2017 22:06:57 -0400 Subject: [PATCH] For english language, will be fixed in 0.6.1 when translations are more complete and better implemented. --- app/Http/Middleware/LanguageMiddleware.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/app/Http/Middleware/LanguageMiddleware.php b/app/Http/Middleware/LanguageMiddleware.php index 81b9a26c..44553ebe 100644 --- a/app/Http/Middleware/LanguageMiddleware.php +++ b/app/Http/Middleware/LanguageMiddleware.php @@ -41,14 +41,15 @@ class LanguageMiddleware */ public function handle($request, Closure $next) { - if (Session::has('applocale')) { - App::setLocale(Session::get('applocale')); - } elseif (Auth::check() && isset(Auth::user()->language)) { - Session::put('applocale', Auth::user()->language); - App::setLocale(Auth::user()->language); - } else { - App::setLocale(Settings::get('default_language', 'en')); - } + // if (Session::has('applocale')) { + // App::setLocale(Session::get('applocale')); + // } elseif (Auth::check() && isset(Auth::user()->language)) { + // Session::put('applocale', Auth::user()->language); + // App::setLocale(Auth::user()->language); + // } else { + // App::setLocale(Settings::get('default_language', 'en')); + // } + App::setLocale('en'); return $next($request); }