MediaWiki 1.42.1
ILanguageConverter.php
Go to the documentation of this file.
1<?php
23
31
37 public function getVariants();
38
51 public function getVariantFallbacks( $variant );
52
58 public function getConvRuleTitle();
59
65 public function getPreferredVariant();
66
72 public function getDefaultVariant();
73
83 public function validateVariant( $variant = null );
84
90 public function getURLVariant();
91
102 public function autoConvert( $text, $toVariant = false );
103
113 public function translate( $text, $variant );
114
121 public function autoConvertToAllVariants( $text );
122
132 public function convertSplitTitle( $title );
133
141 public function convertTitle( $title );
142
150 public function convertNamespace( $index, $variant = null );
151
170 public function convert( $text );
171
183 public function convertTo( $text, $variant, bool $clearState = true );
184
196 public function findVariantLink( &$link, &$nt, $ignoreOtherCond = false );
197
203 public function getExtraHashOptions();
204
215 public function guessVariant( $text, $variant );
216
225 public function markNoConversion( $text, $noParse = false );
226
235 public function convertCategoryKey( $key );
236
243 public function updateConversionTable( LinkTarget $linkTarget );
244
252 public function hasVariants();
253
264 public function hasVariant( $variant );
265
274 public function convertHtml( $text );
275}
Represents a title within MediaWiki.
Definition Title.php:78
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()
This function would not be affected by user's settings.
getExtraHashOptions()
Returns language specific hash options.
convertTo( $text, $variant, bool $clearState=true)
Same as convert() except a extra parameter to custom variant.
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.
convertSplitTitle( $title)
Automatically converts a LinkTarget or PageReference to a readable string in the preferred 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( $title)
Automatically convert a LinkTarget or PageReference to a readable string in the preferred variant.
getPreferredVariant()
Get preferred language 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.
Represents the target of a wiki link.
Interface for objects (potentially) representing a page that can be viewable and linked to on a wiki.