diff options
Diffstat (limited to 'languages/classes/LanguageZh_hans.php')
-rw-r--r-- | languages/classes/LanguageZh_hans.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/languages/classes/LanguageZh_hans.php b/languages/classes/LanguageZh_hans.php index 5b03d731..a65162bc 100644 --- a/languages/classes/LanguageZh_hans.php +++ b/languages/classes/LanguageZh_hans.php @@ -1,6 +1,8 @@ <?php /** + * Simplified Chinese + * * @ingroup Language */ class LanguageZh_hans extends Language { @@ -13,21 +15,21 @@ class LanguageZh_hans extends Language { * for now just treat each character as a word. * @todo Fixme: only do this for Han characters... */ - function wordSegmentation( $string ) { + function segmentByWord( $string ) { $reg = "/([\\xc0-\\xff][\\x80-\\xbf]*)/"; $s = self::insertSpace( $string, $reg ); return $s; } - function normalizeForSearch( $string ) { + function normalizeForSearch( $s ) { wfProfileIn( __METHOD__ ); // Double-width roman characters - $s = self::convertDoubleWidth( $string ); - $s = trim( $s ); $s = parent::normalizeForSearch( $s ); + $s = trim( $s ); + $s = $this->segmentByWord( $s ); wfProfileOut( __METHOD__ ); return $s; } -}
\ No newline at end of file +} |