Wikipedia:用戶介面翻譯/LanguageZh yue.php
出自維基百科,自由嘅百科全書
各用戶喺編輯呢啲原始碼時嘅注意事項:
- 位於 <pre> 同 </pre> 之外嘅文字會被忽略。
- 請以英文版嘅原始碼翻譯,以確保翻譯無誤。
- 建議對一小部份嘅原始碼作出修改,以確保原始碼嘅語法正確無誤。
- 擴展部件信息只會節錄英文同粵語部份,其它嘅語言將唔會列示。
- 根據MediaWiki軟件嘅讀我檔案,除非有特別嘅指明,否則以下所有嘅文字都會以GPL v2 或以上版本發佈。
<?php /** * @addtogroup Language */ class LanguageZh_yue extends Language { function stripForSearch( $string ) { # MySQL fulltext index doesn't grok utf-8, so we # need to fold cases and convert to hex # we also separate characters as "words" if( function_exists( 'mb_strtolower' ) ) { return preg_replace( "/([\\xc0-\\xff][\\x80-\\xbf]*)/e", "' U8' . bin2hex( \"$1\" )", mb_strtolower( $string ) ); } else { list( , $wikiLowerChars ) = Language::getCaseMaps(); return preg_replace( "/([\\xc0-\\xff][\\x80-\\xbf]*)/e", "' U8' . bin2hex( strtr( \"\$1\", \$wikiLowerChars ) )", $string ); } } } ?>