|
MediaWiki master
|
Public Member Functions | |
| __construct (private readonly PageIdentity $pageIdentity, private readonly PageConfigFactory $pageConfigFactory, private readonly Parsoid $parsoid, private readonly SiteConfig $siteConfig, TitleFactory $titleFactory, private readonly LanguageConverterFactory $languageConverterFactory, private readonly LanguageFactory $languageFactory) | |
| convertPageBundleVariant (HtmlPageBundle $pageBundle, Bcp47Code $targetVariant, ?Bcp47Code $sourceVariant=null) | |
| Perform variant conversion on a HtmlPageBundle object. | |
| convertParserOutputVariant (ParserOutput $parserOutput, Bcp47Code $targetVariant, ?Bcp47Code $sourceVariant=null) | |
| Perform variant conversion on a ParserOutput object. | |
| disableFallbackLanguageConverter () | |
| Disable fallback language variant converter. | |
| setPageConfig (PageConfig $pageConfig) | |
| Set the PageConfig object to be used during language variant conversion. | |
| setPageLanguageOverride (Bcp47Code $language) | |
| Set the page content language override. | |
Definition at line 33 of file LanguageVariantConverter.php.
| MediaWiki\Parser\Parsoid\LanguageVariantConverter::__construct | ( | private readonly PageIdentity | $pageIdentity, |
| private readonly PageConfigFactory | $pageConfigFactory, | ||
| private readonly Parsoid | $parsoid, | ||
| private readonly SiteConfig | $siteConfig, | ||
| TitleFactory | $titleFactory, | ||
| private readonly LanguageConverterFactory | $languageConverterFactory, | ||
| private readonly LanguageFactory | $languageFactory ) |
Definition at line 45 of file LanguageVariantConverter.php.
References MediaWiki\Title\TitleFactory\newFromPageIdentity().
| MediaWiki\Parser\Parsoid\LanguageVariantConverter::convertPageBundleVariant | ( | HtmlPageBundle | $pageBundle, |
| Bcp47Code | $targetVariant, | ||
| ?Bcp47Code | $sourceVariant = null ) |
Perform variant conversion on a HtmlPageBundle object.
| HtmlPageBundle | $pageBundle | |
| Bcp47Code | $targetVariant | |
| ?Bcp47Code | $sourceVariant |
| HttpException |
Definition at line 89 of file LanguageVariantConverter.php.
| MediaWiki\Parser\Parsoid\LanguageVariantConverter::convertParserOutputVariant | ( | ParserOutput | $parserOutput, |
| Bcp47Code | $targetVariant, | ||
| ?Bcp47Code | $sourceVariant = null ) |
Perform variant conversion on a ParserOutput object.
| ParserOutput | $parserOutput | |
| Bcp47Code | $targetVariant | |
| ?Bcp47Code | $sourceVariant |
Definition at line 169 of file LanguageVariantConverter.php.
| MediaWiki\Parser\Parsoid\LanguageVariantConverter::disableFallbackLanguageConverter | ( | ) |
Disable fallback language variant converter.
Definition at line 183 of file LanguageVariantConverter.php.
| MediaWiki\Parser\Parsoid\LanguageVariantConverter::setPageConfig | ( | PageConfig | $pageConfig | ) |
Set the PageConfig object to be used during language variant conversion.
If not provided, the object will be created.
| PageConfig | $pageConfig |
Definition at line 64 of file LanguageVariantConverter.php.
| MediaWiki\Parser\Parsoid\LanguageVariantConverter::setPageLanguageOverride | ( | Bcp47Code | $language | ) |
Set the page content language override.
| Bcp47Code | $language |
Definition at line 74 of file LanguageVariantConverter.php.