From a5947b8109381e8e73274a4b337c7c505d28c262 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 19 Dec 2023 20:34:45 +0000 Subject: [PATCH] Added warning in middleware Signed-off-by: snipe --- app/Http/Middleware/CheckLocale.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Http/Middleware/CheckLocale.php b/app/Http/Middleware/CheckLocale.php index ea66c59efa..3c525d172c 100644 --- a/app/Http/Middleware/CheckLocale.php +++ b/app/Http/Middleware/CheckLocale.php @@ -36,6 +36,10 @@ class CheckLocale } + if (config('app.locale') != Helper::mapLegacyLocale($language)) { + \Log::warning('Your current APP_LOCALE in your .env is set to "'.config('app.locale').'" and should be updated to be "'.Helper::mapLegacyLocale($language).'" in '.base_path().'/.env. Translations may display unexpectedly until this is updated.'); + } + \App::setLocale(Helper::mapLegacyLocale($language)); return $next($request); }