forked from Alex/Pterodactyl-Panel
For english language, will be fixed in 0.6.1 when translations are more complete and better implemented.
This commit is contained in:
parent
de0b9beacb
commit
4306eaa00e
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user