* (bug 8396) Ignore out-of-date serialised message caches
* (bug 12195) Undeleting pages now requires 'undelete' permission
* (bug 11810) Localize displayed semicolons
+* New configuration variable $wgExtraLanguageNames
=== Bug fixes in 1.12 ===
/** Hide interlanguage links from the sidebar */
$wgHideInterlanguageLinks = false;
+/** List of language names or overrides for default names in Names.php */
+$wgExtraLanguageNames = array();
/** We speak UTF-8 all the time now, unless some oddities happen */
$wgInputEncoding = 'UTF-8';
* If $customisedOnly is true, only returns codes with a messages file
*/
public static function getLanguageNames( $customisedOnly = false ) {
- global $wgLanguageNames;
+ global $wgLanguageNames, $wgExtraLanguageNames;
+ $allNames = $wgExtraLanguageNames + $wgLanguageNames;
if ( !$customisedOnly ) {
- return $wgLanguageNames;
+ return $allNames;
}
global $IP;
$m = array();
if( preg_match( '/Messages([A-Z][a-z_]+)\.php$/', $file, $m ) ) {
$code = str_replace( '_', '-', strtolower( $m[1] ) );
- if ( isset( $wgLanguageNames[$code] ) ) {
- $names[$code] = $wgLanguageNames[$code];
+ if ( isset( $allNames[$code] ) ) {
+ $names[$code] = $allNames[$code];
}
}
}
}
function getLanguageName( $code ) {
- global $wgLanguageNames;
- if ( ! array_key_exists( $code, $wgLanguageNames ) ) {
+ $names = self::getLanguageNames();
+ if ( !array_key_exists( $code, $names ) ) {
return '';
}
- return $wgLanguageNames[$code];
+ return $names[$code];
}
function getMonthName( $key ) {