Beispiel #1
0
 public static function setUpBeforeClass()
 {
     // Preserve global state
     static::$_defaultLocale = \Locale::getDefault();
 }
Beispiel #2
0
 /**
  * This returns the default locale before any modifications, i.e.
  * the value as stored in the `intl.default_locale` PHP setting before
  * any manipulation by this class.
  *
  * @return string
  */
 public static function defaultLocale()
 {
     if (static::$_defaultLocale === null) {
         static::$_defaultLocale = Locale::getDefault() ?: static::DEFAULT_LOCALE;
     }
     return static::$_defaultLocale;
 }
Beispiel #3
0
 /**
  * This returns the default locale before any modifications, i.e.
  * the value as stored in the `intl.default_locale` PHP setting before
  * any manipulation by this class.
  *
  * @return string
  */
 public static function defaultLocale()
 {
     if (static::$_defaultLocale === null) {
         static::$_defaultLocale = Locale::getDefault() ?: 'en_US';
     }
     return static::$_defaultLocale;
 }