*/ public static function supportedLocaleCodes(): array { return array_keys(config('localization.supportedLocales')); } public static function isSupported(string $locale): bool { return in_array(strtolower($locale), self::supportedLocaleCodes(), true); } public static function normalize(?string $locale): ?string { if ($locale === null || $locale === '') { return null; } $lower = strtolower($locale); return self::isSupported($lower) ? $lower : null; } }