MediaWiki  1.29.2
CollationFa Class Reference

Temporary workaround for incorrect collation of Persian language ('fa') in ICU 52 (bug T139110). More...

Inheritance diagram for CollationFa:
Collaboration diagram for CollationFa:

Public Member Functions

 __construct ()
 
 getPrimarySortKey ( $string)
 
- Public Member Functions inherited from IcuCollation
 __construct ( $locale)
 
 getFirstLetter ( $string)
 Given a string, return the logical "first letter" to be used for grouping on category pages and so on. More...
 
 getFirstLetterCount ()
 
 getFirstLetterData ()
 
 getLetterByIndex ( $index)
 
 getSortKey ( $string)
 Given a string, convert it to a (hopefully short) key that can be used for efficient sorting. More...
 
 getSortKeyByLetterIndex ( $index)
 

Private Attributes

 $tertiaryCollator
 

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. More...
 
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. More...
 
static isCjk ( $codepoint)
 Test if a code point is a CJK (Chinese, Japanese, Korean) character. More...
 
- Static Public Member Functions inherited from Collation
static factory ( $collationName)
 
static singleton ()
 
- Public Attributes inherited from IcuCollation
const FIRST_LETTER_VERSION = 2
 
const RECORD_LENGTH = 14
 
- Protected Attributes inherited from IcuCollation
Language $digitTransformLanguage
 

Detailed Description

Temporary workaround for incorrect collation of Persian language ('fa') in ICU 52 (bug T139110).

All of the following will be considered separate letters for category headings in Persian:

  • Characters 'و' 'ا' (often appear at the beginning of words)
  • Characters 'ٲ' 'ٳ' (may appear at the beginning of words in loanwords)
  • Characters 'ء' 'ئ' (don't appear at the beginning of words, but it's easier to implement)
Since
1.29

Definition at line 31 of file CollationFa.php.

Constructor & Destructor Documentation

◆ __construct()

CollationFa::__construct ( )

Definition at line 34 of file CollationFa.php.

Member Function Documentation

◆ getPrimarySortKey()

CollationFa::getPrimarySortKey (   $string)

Reimplemented from IcuCollation.

Definition at line 39 of file CollationFa.php.

References wfDebug().

Member Data Documentation

◆ $tertiaryCollator

CollationFa::$tertiaryCollator
private

Definition at line 32 of file CollationFa.php.


The documentation for this class was generated from the following file: