Symfony\Component\HttpFoundation\Request::setPhpDefaultLocale PHP Method

setPhpDefaultLocale() private method

Sets the default PHP locale.
private setPhpDefaultLocale ( string $locale )
$locale string
    private function setPhpDefaultLocale($locale)
    {
        // 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', false)) {
                \Locale::setDefault($locale);
            }
        } catch (\Exception $e) {
        }
    }