convert to simplified Chinese before for searching and indexing.
authorZheng Zhu <zhengzhu@users.mediawiki.org>
Thu, 25 Nov 2004 03:17:05 +0000 (03:17 +0000)
committerZheng Zhu <zhengzhu@users.mediawiki.org>
Thu, 25 Nov 2004 03:17:05 +0000 (03:17 +0000)
languages/LanguageZh.php

index f01e373..59afd08 100644 (file)
@@ -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;
 
        }
+       
 }
 ?>