From b9a0f53b1064f0b1c8b375252b9bbe75c9594a51 Mon Sep 17 00:00:00 2001 From: Zheng Zhu Date: Thu, 25 Nov 2004 03:17:05 +0000 Subject: [PATCH] convert to simplified Chinese before for searching and indexing. --- languages/LanguageZh.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/languages/LanguageZh.php b/languages/LanguageZh.php index f01e373597..59afd08000 100644 --- a/languages/LanguageZh.php +++ b/languages/LanguageZh.php @@ -108,11 +108,17 @@ class LanguageZh extends LanguageZh_cn { function stripForSearch( $string ) { $fname="zhsegment"; wfProfileIn( $fname ); + //always convert to zh-cn before indexing. it should be + //better to use zh-cn for search, since conversion from + //Traditional to Simplified is less ambiguous than the + //other way around + $string = $this->autoConvert($string, 'zh-cn'); $t = $this->mZhClient->segment($string); $t = LanguageUtf8::stripForSearch( $t ); wfProfileOut( $fname ); return $t; } + } ?> -- 2.20.1