00001 <?php 00002 00006 class LanguageZh_hans extends Language { 00007 function hasWordBreaks() { 00008 return false; 00009 } 00010 00016 function wordSegmentation( $string ) { 00017 $reg = "/([\\xc0-\\xff][\\x80-\\xbf]*)/"; 00018 $s = self::insertSpace( $string, $reg ); 00019 return $s; 00020 } 00021 00022 function normalizeForSearch( $string ) { 00023 wfProfileIn( __METHOD__ ); 00024 00025 // Double-width roman characters 00026 $s = self::convertDoubleWidth( $string ); 00027 $s = trim( $s ); 00028 $s = parent::normalizeForSearch( $s ); 00029 00030 wfProfileOut( __METHOD__ ); 00031 return $s; 00032 } 00033 }