You are here

private function Request::setPhpDefaultLocale in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Request.php \Symfony\Component\HttpFoundation\Request::setPhpDefaultLocale()

Sets the default PHP locale.

Parameters

string $locale:

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 1864

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