aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiQueryLangLinks.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/api/ApiQueryLangLinks.php')
-rw-r--r--includes/api/ApiQueryLangLinks.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/api/ApiQueryLangLinks.php b/includes/api/ApiQueryLangLinks.php
index 13246e625a1f..c0067632f183 100644
--- a/includes/api/ApiQueryLangLinks.php
+++ b/includes/api/ApiQueryLangLinks.php
@@ -122,11 +122,13 @@ class ApiQueryLangLinks extends ApiQueryBase {
$entry['url'] = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT );
}
}
+ $languageNameUtils = MediaWikiServices::getInstance()->getLanguageNameUtils();
if ( isset( $prop['langname'] ) ) {
- $entry['langname'] = Language::fetchLanguageName( $row->ll_lang, $params['inlanguagecode'] );
+ $entry['langname'] = $languageNameUtils
+ ->getLanguageName( $row->ll_lang, $params['inlanguagecode'] );
}
if ( isset( $prop['autonym'] ) ) {
- $entry['autonym'] = Language::fetchLanguageName( $row->ll_lang );
+ $entry['autonym'] = $languageNameUtils->getLanguageName( $row->ll_lang );
}
ApiResult::setContentValue( $entry, 'title', $row->ll_title );
$fit = $this->addPageSubItem( $row->ll_from, $entry );