MediaWiki  REL1_19
LanguageZh_hans.php
Go to the documentation of this file.
00001 <?php
00002 
00008 class LanguageZh_hans extends Language {
00009 
00013         function hasWordBreaks() {
00014                 return false;
00015         }
00016 
00026         function segmentByWord( $string ) {
00027                 $reg = "/([\\xc0-\\xff][\\x80-\\xbf]*)/";
00028                 $s = self::insertSpace( $string, $reg );
00029                 return $s;
00030         }
00031 
00036         function normalizeForSearch( $s ) {
00037                 wfProfileIn( __METHOD__ );
00038 
00039                 // Double-width roman characters
00040                 $s = parent::normalizeForSearch( $s );
00041                 $s = trim( $s );
00042                 $s = $this->segmentByWord( $s );
00043 
00044                 wfProfileOut( __METHOD__ );
00045                 return $s;
00046         }
00047 }