function ut_coll_get_locale($coll, $type) { return $GLOBALS['oo-mode'] ? $coll->getLocale($type) : collator_get_locale($coll, $type); }
<?php /* * Check getting global error message. */ // Suppress warning messages. error_reporting(E_ERROR); if (collator_get_locale() !== false) { echo "failed\n"; } else { printf("%s\n", intl_get_error_message()); }
/** * @return string|null */ public function getLocale() { if (self::$current) { return collator_get_locale(self::$current, \Locale::VALID_LOCALE); } return null; }