Collator::__construct
Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.
Collator::__construct
Референца за `collator.construct.php` со подобрена типографија и навигација.
Collator::__construct
Класата Collator
Collator::__construct — Create a collator
Параметри
locale-
The locale whose collation rules should be used. Special values for locales can be passed in - if an empty string is passed for the locale, the default locale's collation rules will be used. If
"root"се помине, поставен на Quaternary. Во таков случај, празно место, пунктуација и симболи се земаат предвид при споредба на низи, но само ако сите други аспекти на низите (основни букви, акценти и големина) се идентични. Ако Alternate не е поставен на Shifted, тогаш нема разлика помеѓу Strength од 3 и Strength од 4. За повеќе информации и примери, видете Variable_Weighting во rules will be used.На
localeattribute is typically the most important attribute for correct sorting and matching, according to the user expectations in different countries and regions. The default поставен на Quaternary. Во таков случај, празно место, пунктуација и симболи се земаат предвид при споредба на низи, но само ако сите други аспекти на низите (основни букви, акценти и големина) се идентични. Ако Alternate не е поставен на Shifted, тогаш нема разлика помеѓу Strength од 3 и Strength од 4. За повеќе информации и примери, видете Variable_Weighting во ordering will only sort a few languages such as Dutch and Portuguese correctly ("correctly" meaning according to the normal expectations for users of the languages). Otherwise, you need to supply the locale to UCA in order to properly collate text for a given language. Thus a locale needs to be supplied so as to choose a collator that is correctly tailored for that locale. The choice of a locale will automatically preset the values for all of the attributes to something that is reasonable for that locale. Thus most of the time the other attributes do not need to be explicitly set. In some cases, the choice of locale will make a difference in string comparison performance and/or sort key length.
Errors/Exceptions
Returns an "empty" object on error. Use intl_get_error_code() and/or intl_get_error_message() to know what happened.
Примери
Пример #1 Collator::__construct() example
<?php
$coll = new Collator('en_CA');
?>