function Request::setPhpDefaultLocale
2 calls to Request::setPhpDefaultLocale()
- Request::setDefaultLocale in vendor/
symfony/ http-foundation/ Request.php - Sets the default locale.
- Request::setLocale in vendor/
symfony/ http-foundation/ Request.php - Sets the locale.
File
-
vendor/
symfony/ http-foundation/ Request.php, line 1927
Class
- Request
- Request represents an HTTP request.
Namespace
Symfony\Component\HttpFoundationCode
private function setPhpDefaultLocale(string $locale) : void {
// if either the class Locale doesn't exist, or an exception is thrown when
// setting the default locale, the intl module is not installed, and
// the call can be ignored:
try {
if (class_exists(\Locale::class, false)) {
\Locale::setDefault($locale);
}
} catch (\Exception) {
}
}