public static function setUpBeforeClass() { // Preserve global state static::$_defaultLocale = \Locale::getDefault(); }
/** * 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; }
/** * 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; }