* fixed js2 fileexist checking related to rewrite of special upload page in r57868
[lhc/web/wiklou.git] / languages / classes / LanguageZh_hans.php
1 <?php
2
3 /**
4 * @ingroup Language
5 */
6 class LanguageZh_hans extends Language {
7 function hasWordBreaks() {
8 return false;
9 }
10
11 function stripForSearch( $string ) {
12 // Eventually this should be a word segmentation;
13 // for now just treat each character as a word.
14 //
15 // Note we put a space on both sides to cover cases
16 // where a number or Latin char follows a Han char.
17 //
18 // @fixme only do this for Han characters...
19 $t = preg_replace(
20 "/([\\xc0-\\xff][\\x80-\\xbf]*)/",
21 " $1 ", $string);
22 $t = preg_replace( '/ +/', ' ', $t );
23 $t = trim( $t );
24 return parent::stripForSearch( $t );
25 }
26 }