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