MediaWiki
master
LanguageZh.php
Go to the documentation of this file.
1
<?php
30
class
LanguageZh
extends
LanguageZh_hans
{
45
public
function
segmentForDiff
( $text ) {
46
$text = str_replace(
"\x0c"
,
"\u{FFFD}"
, $text );
47
return
preg_replace(
'/[\xc0-\xff][\x80-\xbf]*/'
,
"\x0c$0"
, $text );
48
}
49
50
public
function
unsegmentForDiff
( $text ) {
51
return
str_replace(
"\x0c"
,
''
, $text );
52
}
53
54
protected
function
getSearchIndexVariant
() {
55
return
'zh-hans'
;
56
}
57
58
public
function
convertForSearchResult
( $termsArray ) {
59
$terms = implode(
'|'
, $termsArray );
60
$terms = self::convertDoubleWidth( $terms );
61
$terms = implode(
'|'
, $this->getConverterInternal()->autoConvertToAllVariants( $terms ) );
62
return
array_unique( explode(
'|'
, $terms ) );
63
}
64
}
LanguageZh_hans
Simplified Chinese.
Definition
LanguageZh_hans.php:27
LanguageZh
Chinese-specific code.
Definition
LanguageZh.php:30
LanguageZh\convertForSearchResult
convertForSearchResult( $termsArray)
Definition
LanguageZh.php:58
LanguageZh\segmentForDiff
segmentForDiff( $text)
Add a formfeed character between each non-ASCII character, so that "word-level" diffs will effectivel...
Definition
LanguageZh.php:45
LanguageZh\getSearchIndexVariant
getSearchIndexVariant()
Definition
LanguageZh.php:54
LanguageZh\unsegmentForDiff
unsegmentForDiff( $text)
Definition
LanguageZh.php:50
includes
languages
LanguageZh.php
Generated on Sat Sep 14 2024 03:23:22 for MediaWiki by
1.10.0