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