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