* Make sure the site language is in the list; a custom language code
* might not have a defined name...
*/
- $languages = $wgLang->getLanguageNames( true );
+ $languages = Language::getLanguageNames( true );
if( !array_key_exists( $wgContLanguageCode, $languages ) ) {
$languages[$wgContLanguageCode] = $wgContLanguageCode;
}
* Get language names, indexed by code.
* If $customisedOnly is true, only returns codes with a messages file
*/
- function getLanguageNames( $customisedOnly = false ) {
+ public static function getLanguageNames( $customisedOnly = false ) {
global $wgLanguageNames;
if ( !$customisedOnly ) {
return $wgLanguageNames;