8 class LanguageZh_hans
extends Language
{
9 function hasWordBreaks() {
14 * Eventually this should be a word segmentation;
15 * for now just treat each character as a word.
16 * @todo Fixme: only do this for Han characters...
18 function segmentByWord( $string ) {
19 $reg = "/([\\xc0-\\xff][\\x80-\\xbf]*)/";
20 $s = self
::insertSpace( $string, $reg );
24 function normalizeForSearch( $s ) {
25 wfProfileIn( __METHOD__
);
27 // Double-width roman characters
28 $s = parent
::normalizeForSearch( $s );
30 $s = $this->segmentByWord( $s );
32 wfProfileOut( __METHOD__
);