MediaWiki master
|
Chinese-specific code. More...
Inherits LanguageZh_hans.
Inherited by LanguageGan, and LanguageWuu.
Public Member Functions | |
convertForSearchResult ( $termsArray) | |
segmentForDiff ( $text) | |
Add a formfeed character between each non-ASCII character, so that "word-level" diffs will effectively operate on a character level. | |
unsegmentForDiff ( $text) | |
Public Member Functions inherited from LanguageZh_hans | |
formatDuration ( $seconds, array $chosenIntervals=[]) | |
hasWordBreaks () | |
normalizeForSearch ( $s) | |
segmentByWord ( $string) | |
Protected Member Functions | |
getSearchIndexVariant () | |
Chinese-specific code.
This handles both Traditional and Simplified Chinese. Right now, we distinguish zh_hans
, zh_hant
, zh_cn
, zh_tw
, zh_sg
, and zh_hk
.
Definition at line 30 of file LanguageZh.php.
LanguageZh::convertForSearchResult | ( | $termsArray | ) |
Definition at line 58 of file LanguageZh.php.
|
protected |
Reimplemented in LanguageGan, and LanguageWuu.
Definition at line 54 of file LanguageZh.php.
LanguageZh::segmentForDiff | ( | $text | ) |
Add a formfeed character between each non-ASCII character, so that "word-level" diffs will effectively operate on a character level.
The FF characters are stripped out by unsegmentForDiff().
We use FF because it is the least used character that is matched by PCRE's \s class.
In the unlikely event that an FF character appears in the input, it will be displayed in the diff as a replacement character.
string | $text |
Definition at line 45 of file LanguageZh.php.
LanguageZh::unsegmentForDiff | ( | $text | ) |
Definition at line 50 of file LanguageZh.php.