Fixed user scripts/styles and site scripts/styles - they were totally broken in r7277...
[mediawiki.git] / languages / classes / LanguageZh_hans.php
blob9ea51def3d55aaa7a1f2e84007690011c344dd53
1 <?php
3 /**
4 * @ingroup Language
5 */
6 class LanguageZh_hans extends Language {
7 function hasWordBreaks() {
8 return false;
11 /**
12 * Eventually this should be a word segmentation;
13 * for now just treat each character as a word.
14 * @todo Fixme: only do this for Han characters...
16 function segmentByWord( $string ) {
17 $reg = "/([\\xc0-\\xff][\\x80-\\xbf]*)/";
18 $s = self::insertSpace( $string, $reg );
19 return $s;
22 function normalizeForSearch( $s ) {
23 wfProfileIn( __METHOD__ );
25 // Double-width roman characters
26 $s = parent::normalizeForSearch( $s );
27 $s = trim( $s );
28 $s = $this->segmentByWord( $s );
30 wfProfileOut( __METHOD__ );
31 return $s;