MediaWiki REL1_35
ILanguageConverter.php
Go to the documentation of this file.
1<?php
21
29
35 public function getVariants();
36
48 public function getVariantFallbacks( $variant );
49
54 public function getConvRuleTitle();
55
60 public function getPreferredVariant();
61
67 public function getDefaultVariant();
68
78 public function validateVariant( $variant = null );
79
85 public function getURLVariant();
86
97 public function autoConvert( $text, $toVariant = false );
98
108 public function translate( $text, $variant );
109
116 public function autoConvertToAllVariants( $text );
117
125 public function convertTitle( LinkTarget $linkTarget );
126
134 public function convertNamespace( $index, $variant = null );
135
154 public function convert( $text );
155
165 public function convertTo( $text, $variant );
166
178 public function findVariantLink( &$link, &$nt, $ignoreOtherCond = false );
179
185 public function getExtraHashOptions();
186
197 public function guessVariant( $text, $variant );
198
207 public function markNoConversion( $text, $noParse = false );
208
217 public function convertCategoryKey( $key );
218
225 public function updateConversionTable( LinkTarget $linkTarget );
226
234 public function hasVariants();
235
246 public function hasVariant( $variant );
247
256 public function convertHtml( $text );
257}
The shared interface for all language converters.
convertNamespace( $index, $variant=null)
Get the namespace display name in the preferred variant.
getVariantFallbacks( $variant)
In case some variant is not defined in the markup, we need to have some fallback.
getDefaultVariant()
Get default variant.
getExtraHashOptions()
Returns language specific hash options.
convertHtml( $text)
Perform output conversion on a string, and encode for safe HTML output.
updateConversionTable(LinkTarget $linkTarget)
Refresh the cache of conversion tables when MediaWiki:Conversiontable* is updated.
findVariantLink(&$link, &$nt, $ignoreOtherCond=false)
If a language supports multiple variants, it is possible that non-existing link in one variant actual...
convertCategoryKey( $key)
Convert the sorting key for category links.
hasVariants()
Check if this is a language with variants.
validateVariant( $variant=null)
Validate the variant and return an appropriate strict internal variant code if one exists.
guessVariant( $text, $variant)
Guess if a text is written in a variant.
getConvRuleTitle()
Get the title produced by the conversion rule.
convert( $text)
Convert text to different variants of a language.
markNoConversion( $text, $noParse=false)
Enclose a string with the "no conversion" tag.
translate( $text, $variant)
Translate a string to a variant.
convertTitle(LinkTarget $linkTarget)
Auto convert a LinkTarget object to a readable string in the preferred variant.
getPreferredVariant()
Get preferred language variant.
convertTo( $text, $variant)
Same as convert() except a extra parameter to custom variant.
hasVariant( $variant)
Strict check if the language has the specific variant.
getURLVariant()
Get the variant specified in the URL.
autoConvertToAllVariants( $text)
Call translate() to convert text to all valid variants.
getVariants()
Get all valid variants.
autoConvert( $text, $toVariant=false)
Dictionary-based conversion.