MediaWiki REL1_31
|
Temporary workaround for incorrect collation of Persian language ('fa') in ICU 52 (bug T139110). More...
Public Member Functions | |
__construct () | |
getFirstLetter ( $string) | |
Given a string, return the logical "first letter" to be used for grouping on category pages and so on. | |
getSortKey ( $string) | |
Given a string, convert it to a (hopefully short) key that can be used for efficient sorting. | |
Public Member Functions inherited from IcuCollation | |
__construct ( $locale) | |
getFirstLetterCount () | |
getFirstLetterData () | |
getLetterByIndex ( $index) | |
getPrimarySortKey ( $string) | |
getSortKeyByLetterIndex ( $index) | |
Private Attributes | |
$override | |
Additional Inherited Members | |
Static Public Member Functions inherited from IcuCollation | |
static | getICUVersion () |
Return the version of ICU library used by PHP's intl extension, or false when the extension is not installed of the version can't be determined. | |
static | getUnicodeVersionForICU () |
Return the version of Unicode appropriate for the version of ICU library currently in use, or false when it can't be determined. | |
static | isCjk ( $codepoint) |
Test if a code point is a CJK (Chinese, Japanese, Korean) character. | |
Static Public Member Functions inherited from Collation | |
static | factory ( $collationName) |
static | singleton () |
Public Attributes inherited from IcuCollation | |
const | FIRST_LETTER_VERSION = 3 |
const | RECORD_LENGTH = 14 |
Protected Attributes inherited from IcuCollation | |
Language | $digitTransformLanguage |
Temporary workaround for incorrect collation of Persian language ('fa') in ICU 52 (bug T139110).
Replace with other letters that appear in an okish spot in the alphabet
Definition at line 31 of file CollationFa.php.
CollationFa::__construct | ( | ) |
Definition at line 45 of file CollationFa.php.
CollationFa::getFirstLetter | ( | $string | ) |
Given a string, return the logical "first letter" to be used for grouping on category pages and so on.
This has to be coordinated carefully with convertToSortkey(), or else the sorted list might jump back and forth between the same "initial letters" or other pathological behavior. For instance, if you just return the first character, but "a" sorts the same as "A" based on getSortKey(), then you might get a list like
== A ==
== a ==
== A ==
etc., assuming for the sake of argument that $wgCapitalLinks is false.
string | $string | UTF-8 string |
Reimplemented from IcuCollation.
Definition at line 54 of file CollationFa.php.
CollationFa::getSortKey | ( | $string | ) |
Given a string, convert it to a (hopefully short) key that can be used for efficient sorting.
A binary sort according to the sortkeys corresponds to a logical sort of the corresponding strings. Current code expects that a line feed character should sort before all others, but has no other particular expectations (and that one can be changed if necessary).
string | $string | UTF-8 string |
Reimplemented from IcuCollation.
Definition at line 49 of file CollationFa.php.
|
private |
Definition at line 34 of file CollationFa.php.