mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-13 19:51:30 +00:00
updated streamline-setup v2
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user