}
function getKeys() {
- global $wgAllMessagesEn;
+ global $wgAllMessagesEn, $wgLang;
+ $ucfirst = get_class($wgLang) . "::ucfirst";
if ( !$this->mKeys ) {
- $this->mKeys = array_map( 'ucfirst', array_keys( $wgAllMessagesEn ) );
+ $this->mKeys = array_map( $ucfirst, array_keys( $wgAllMessagesEn ) );
}
return $this->mKeys;
}
function isCacheable( $key ) {
- global $wgAllMessagesEn;
- return array_key_exists( lcfirst( $key ), $wgAllMessagesEn ) ||
+ global $wgAllMessagesEn, $wgLang;
+ return array_key_exists( $wgLang->lcfirst( $key ), $wgAllMessagesEn ) ||
array_key_exists( $key, $wgAllMessagesEn );
}
if ( $this->mDisable ) {
return $wgLang->getMessage( $key );
}
- $title = ucfirst( $key );
+ $title = $wgLang->ucfirst( $key );
$message = false;
return $message;
}
}
-
-function lcfirst( $s ) {
- return strtolower( $s{0} ). substr( $s, 1 );
-}
?>
return ucfirst( $string );
}
+ function lcfirst( $s ) {
+ return strtolower( $s{0} ). substr( $s, 1 );
+ }
+
function checkTitleEncoding( $s ) {
global $wgInputEncoding;
$string );
}
+ function lcfirst( $string ) {
+ global $wikiUpperChars, $wikiLowerChars;
+ return preg_replace (
+ "/^([\\x00-\\x7f]|[\\xc0-\\xff][\\x80-\\xbf]*)/e",
+ "strtr ( \"\$1\" , \$wikiLowerChars )",
+ $string );
+ }
+
function stripForSearch( $string ) {
# MySQL fulltext index doesn't grok utf-8, so we
# need to fold cases and convert to hex