aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiSetPageLanguage.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/api/ApiSetPageLanguage.php')
-rw-r--r--includes/api/ApiSetPageLanguage.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/includes/api/ApiSetPageLanguage.php b/includes/api/ApiSetPageLanguage.php
index 84ab3ea98104..68531b7f2c32 100644
--- a/includes/api/ApiSetPageLanguage.php
+++ b/includes/api/ApiSetPageLanguage.php
@@ -20,6 +20,8 @@
* @file
*/
+use MediaWiki\MediaWikiServices;
+
/**
* API module that facilitates changing the language of a page.
* The API equivalent of SpecialPageLanguage.
@@ -114,7 +116,9 @@ class ApiSetPageLanguage extends ApiBase {
'lang' => [
ApiBase::PARAM_TYPE => array_merge(
[ 'default' ],
- array_keys( Language::fetchLanguageNames( null, 'mwfile' ) )
+ array_keys( MediaWikiServices::getInstance()
+ ->getLanguageNameUtils()
+ ->getLanguageNames( null, 'mwfile' ) )
),
ApiBase::PARAM_REQUIRED => true,
],