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)
{
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);
}