private function Request::setPhpDefaultLocale

Sets the default PHP locale.

Parameters

string $locale:

2 calls to Request::setPhpDefaultLocale()
Request::setDefaultLocale in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php
Sets the default locale.
Request::setLocale in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php
Sets the locale.

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php, line 1478

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

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) {
  }
}