|
| loadDefaultTables () |
|
| findVariantLink ( $link, $nt, $ignoreOtherCond) |
|
| guessVariant ( $text, $variant) |
| Variant based on the ReplacementMachine's bracketing abilities.
|
|
| __construct (Language $language, string $langCode, array $variants, ?array $variantfallbacks=null, ?array $flags=null, ?array $manualLevel=null) |
|
| getMachine () |
| Return the ReplacementMachine powering this conversion.
|
|
| setMachine (ReplacementMachine $machine) |
|
| translate ( $fromVariant, $text, $toVariant) |
|
|
static | classFromCode (string $code, bool $fallback) |
| Try to return a classname from a given code.
|
|
static | loadLanguage (Env $env, Bcp47Code $lang, bool $fallback=false) |
|
static | maybeConvert (Env $env, Document $doc, ?Bcp47Code $htmlVariantLanguage, ?Bcp47Code $wtVariantLanguage) |
| Convert the given document into $htmlVariantLanguage, if: 1) language converter is enabled on this wiki, and 2) the htmlVariantLanguage is specified, and it is a known variant (not a base language code)
|
|
static | baseToVariant (Env $env, Node $rootNode, $htmlVariantLanguage, $wtVariantLanguage) |
| Convert a text in the "base variant" to a specific variant, given by htmlVariantLanguage .
|
|
static | implementsLanguageConversionBcp47 (Env $env, Bcp47Code $htmlVariantLanguage) |
| Check if support for html variant conversion is implemented.
|
|
static | autoConvertToAllVariants (Env $env, DOMDocument $doc, string $text) |
| Convert a string in an unknown variant of the page language to all its possible variants.
|
|
◆ findVariantLink()
Wikimedia\Parsoid\Language\SrConverter::findVariantLink |
( |
| $link, |
|
|
| $nt, |
|
|
| $ignoreOtherCond ) |
◆ guessVariant()
Wikimedia\Parsoid\Language\SrConverter::guessVariant |
( |
| $text, |
|
|
| $variant ) |
◆ loadDefaultTables()
Wikimedia\Parsoid\Language\SrConverter::loadDefaultTables |
( |
| ) |
|
The documentation for this class was generated from the following file:
- src/Language/SrConverter.php