Internationalization Functions
- Введение
- Installing/Configuring
- Предопределенные константы
- Примеры
- intl Функции
- grapheme_extract — Function to extract a sequence of default grapheme clusters from a text buffer, which must be encoded in UTF-8.
- grapheme_extractb — Function to extract a sequence of default grapheme clusters from a text buffer, which must be encoded in UTF-8.
- grapheme_stripos — Find position (in grapheme units) of first occurrence of a case-insensitive string
- grapheme_stristr — Returns part of haystack string from the first occurrence of case-insensitive needle to the end of haystack.
- grapheme_strlen — Get string length in grapheme units
- grapheme_strpos — Find position (in grapheme units) of first occurrence of a string
- grapheme_strripos — Find position (in grapheme units) of last occurrence of a case-insensitive string
- grapheme_strrpos — Find position (in grapheme units) of last occurrence of a string
- grapheme_strstr — Returns part of haystack string from the first occurrence of needle to the end of haystack.
- grapheme_substr — Return part of a string
- intl_error_name — Get symbolic name for a given error code
- intl_get_error_code — Get the last error code
- intl_get_error_message — Get description of the last error
- intl_is_failure — Check whether the given error code indicates failure
- Collator — The Collator class
- Collator::asort — Sort array maintaining index association
- Collator::compare — Compare two Unicode strings
- Collator::__construct — Create a collator
- Collator::create — Create a collator
- Collator::getAttribute — Get collation attribute value
- Collator::getErrorCode — Get collator's last error code
- Collator::getErrorMessage — Get text for collator's last error code
- Collator::getLocale — Get the locale name of the collator
- Collator::getStrength — Get current collation strength
- Collator::setAttribute — Set collation attribute
- Collator::setStrength — Set collation strength
- Collator::sortWithSortKeys — Sort array using specified collator and sort keys
- Collator::sort — Sort array using specified collator
- NumberFormatter — The NumberFormatter class
- NumberFormatter::create — Create a number formatter
- NumberFormatter::formatCurrency — Format a currency value
- NumberFormatter::format — Format a number
- NumberFormatter::getAttribute — Get an attribute
- NumberFormatter::getErrorCode — Get formatter's last error code.
- NumberFormatter::getErrorMessage — Get formatter's last error message.
- NumberFormatter::getLocale — Get formatter locale
- NumberFormatter::getPattern — Get formatter pattern
- NumberFormatter::getSymbol — Get a symbol value
- NumberFormatter::getTextAttribute — Get a text attribute
- NumberFormatter::parseCurrency — Parse a currency number
- NumberFormatter::parse — Parse a number
- NumberFormatter::setAttribute — Set an attribute
- NumberFormatter::setPattern — Set formatter pattern
- NumberFormatter::setSymbol — Set a symbol value
- NumberFormatter::setTextAttribute — Set a text attribute
- Locale — The Locale class
- Locale::composeLocale — Returns a correctly ordered and delimited locale ID
- Locale::filterMatches — Checks if a $langtag filter matches with $locale according to
- Locale::getAllVariants — Gets the variants for the input locale
- Locale::getDefault — Gets the default locale value from the INTL global 'default_locale'
- Locale::getDisplayLanguage — Returns an appropriately localized display name for language of the inputlocale
- Locale::getDisplayName — Returns an appropriately localized display name for the input locale
- Locale::getDisplayRegion — Returns an appropriately localized display name for region of the input locale
- Locale::getDisplayScript — Returns an appropriately localized display name for script of the input locale
- Locale::getDisplayVariant — Returns an appropriately localized display name for variants of the input locale
- Locale::getKeywords — Gets the keywords for the input locale
- Locale::getPrimaryLanguage — Gets the primary language for the input locale
- Locale::getRegion — Gets the region for the input locale
- Locale::getScript — Gets the script for the input locale
- Locale::lookup — Searches the language tag list for the best match to the language
- Locale::parseLocale — Returns a key-value array of locale ID subtag elements.
- Locale::setDefault — sets the default runtime locale
- Normalizer — The Normalizer class
- Normalizer::isNormalized — Checks if the provided string is already in the specified normalization form.
- Normalizer::normalize — Normalizes the input provided and returns the normalized string
- MessageFormatter — The MessageFormatter class
- MessageFormatter::create — Constructs a new Message Formatter
- MessageFormatter::formatMessage — Quick format message
- MessageFormatter::format — Format the message
- MessageFormatter::getErrorCode — Get the error code from last operation
- MessageFormatter::getErrorMessage — Get the error text from the last operation
- MessageFormatter::getLocale — Get the locale for which the formatter was created.
- MessageFormatter::getPattern — Get the pattern used by the formatter
- MessageFormatter::parseMessage — Quick parse input string
- MessageFormatter::parse — Parse input string according to pattern
- MessageFormatter::setPattern — Set the pattern used by the formatter
- DateFormatter — The DateFormatter class
- DateFormatter::create — Create a date formatter
- DateFormatter::format — Format the date/time value as a string
- DateFormatter::getCalendar — Get the calendar used for the DateFormatter
- DateFormatter::getDateType — Get the datetype used for the DateFormatter
- DateFormatter::getErrorCode — Get the error code from last operation
- DateFormatter::getErrorMessage — Get the error text from the last operation.
- DateFormatter::getLocale — Get the locale used by formatter
- DateFormatter::getPattern — Get the pattern used for the DateFormatter
- DateFormatter::getTimeType — Get the timetype used for the DateFormatter
- DateFormatter::getTimeZoneId — Get the timezone-id used for the DateFormatter
- DateFormatter::isLenient — Get the lenient used for the DateFormatter
- DateFormatter::localtime — Parse string to a field-based time value
- DateFormatter::parse — Parse string to a timestamp value
- DateFormatter::setCalendar — sets the calendar used to the appropriate calendar, which must be
- DateFormatter::setLenient — Set the leniency of the parser
- DateFormatter::setPattern — Set the pattern used for the DateFormatter
- DateFormatter::setTimeZoneId — Sets the time zone to use
Коментарии
Most of this classes are not documented clearly.
You can use https://github.com/salarmehr/cosmopolitan that is based on Intl extension and way easier to use.