aboutsummaryrefslogtreecommitdiffstats
path: root/includes/htmlform/fields/HTMLSelectLanguageField.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/htmlform/fields/HTMLSelectLanguageField.php')
-rw-r--r--includes/htmlform/fields/HTMLSelectLanguageField.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/includes/htmlform/fields/HTMLSelectLanguageField.php b/includes/htmlform/fields/HTMLSelectLanguageField.php
index 98cf3b19c453..2383953f2ac4 100644
--- a/includes/htmlform/fields/HTMLSelectLanguageField.php
+++ b/includes/htmlform/fields/HTMLSelectLanguageField.php
@@ -1,5 +1,7 @@
<?php
+use MediaWiki\MediaWikiServices;
+
/**
* Language select field.
*/
@@ -15,7 +17,9 @@ class HTMLSelectLanguageField extends HTMLSelectField {
$languageCode = $wgLanguageCode;
}
- $languages = Language::fetchLanguageNames( null, 'mw' );
+ $languages = MediaWikiServices::getInstance()
+ ->getLanguageNameUtils()
+ ->getLanguageNames( null, 'mw' );
// Make sure the site language is in the list;
// a custom language code might not have a defined name…