This commit is contained in:
2025-05-12 14:25:25 +02:00
parent ab2db755ef
commit 9e378ca2b7
2719 changed files with 46505 additions and 60181 deletions

View File

@@ -34,9 +34,14 @@ class LocaleSwitcher implements LocaleAwareInterface
public function setLocale(string $locale): void
{
if (class_exists(\Locale::class)) {
\Locale::setDefault($locale);
// Silently ignore if the intl extension is not loaded
try {
if (class_exists(\Locale::class, false)) {
\Locale::setDefault($locale);
}
} catch (\Exception) {
}
$this->locale = $locale;
$this->requestContext?->setParameter('_locale', $locale);