diff --git a/.env.example b/.env.example index 8c9c916b0..0b59de0c9 100644 --- a/.env.example +++ b/.env.example @@ -7,9 +7,7 @@ APP_CLEAR_TASKLOG=720 APP_DELETE_MINUTES=10 APP_ENVIRONMENT_ONLY=true LOG_CHANNEL=daily - APP_LOCALE=en -APP_LOCALE_IS_GLOBAL=false DB_HOST=127.0.0.1 DB_PORT=3306 diff --git a/app/Http/Middleware/LanguageMiddleware.php b/app/Http/Middleware/LanguageMiddleware.php index b938519a7..f0c341276 100644 --- a/app/Http/Middleware/LanguageMiddleware.php +++ b/app/Http/Middleware/LanguageMiddleware.php @@ -48,11 +48,7 @@ class LanguageMiddleware */ public function handle(Request $request, Closure $next) { - if (! Auth::check() || $this->config->get('pterodactyl.lang.global')) { - $this->app->setLocale($this->config->get('app.locale', 'en')); - } else { - $this->app->setLocale(Auth::user()->language); - } + $this->app->setLocale($request->user()->language ?? $this->config->get('app.locale')); return $next($request); } diff --git a/config/pterodactyl.php b/config/pterodactyl.php index 56f7e7aa9..e06c709ef 100644 --- a/config/pterodactyl.php +++ b/config/pterodactyl.php @@ -161,7 +161,6 @@ return [ */ 'lang' => [ 'in_context' => env('PHRASE_IN_CONTEXT', false), - 'global' => env('APP_LOCALE_IS_GLOBAL', false), ], /*