MediaWiki  REL1_20
LanguageZh_hans.php
Go to the documentation of this file.
00001 <?php
00029 class LanguageZh_hans extends Language {
00030 
00034         function hasWordBreaks() {
00035                 return false;
00036         }
00037 
00047         function segmentByWord( $string ) {
00048                 $reg = "/([\\xc0-\\xff][\\x80-\\xbf]*)/";
00049                 $s = self::insertSpace( $string, $reg );
00050                 return $s;
00051         }
00052 
00057         function normalizeForSearch( $s ) {
00058                 wfProfileIn( __METHOD__ );
00059 
00060                 // Double-width roman characters
00061                 $s = parent::normalizeForSearch( $s );
00062                 $s = trim( $s );
00063                 $s = $this->segmentByWord( $s );
00064 
00065                 wfProfileOut( __METHOD__ );
00066                 return $s;
00067         }
00068 }