For english language, will be fixed in 0.6.1 when translations are more complete and better implemented.

This commit is contained in:
Dane Everitt 2017-05-06 22:06:57 -04:00
parent de0b9beacb
commit 4306eaa00e
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -41,14 +41,15 @@ class LanguageMiddleware
*/ */
public function handle($request, Closure $next) public function handle($request, Closure $next)
{ {
if (Session::has('applocale')) { // if (Session::has('applocale')) {
App::setLocale(Session::get('applocale')); // App::setLocale(Session::get('applocale'));
} elseif (Auth::check() && isset(Auth::user()->language)) { // } elseif (Auth::check() && isset(Auth::user()->language)) {
Session::put('applocale', Auth::user()->language); // Session::put('applocale', Auth::user()->language);
App::setLocale(Auth::user()->language); // App::setLocale(Auth::user()->language);
} else { // } else {
App::setLocale(Settings::get('default_language', 'en')); // App::setLocale(Settings::get('default_language', 'en'));
} // }
App::setLocale('en');
return $next($request); return $next($request);
} }