languageConverterFactory = $languageConverterFactory; } /** * Whether the Title is also available in other languages or variants * @param OutputPage $out Output page to fetch language links * @param Title $title * @return bool */ public function doesTitleHasLanguagesOrVariants( OutputPage $out, Title $title ): bool { if ( $out->getLanguageLinks() !== [] ) { return true; } $langConv = $this->languageConverterFactory->getLanguageConverter( $title->getPageLanguage() ); return $langConv->hasVariants(); } }