MediaWiki  REL1_31
IuConverter Class Reference

Conversion script between Latin and Syllabics for Inuktitut. More...

Inheritance diagram for IuConverter:
Collaboration diagram for IuConverter:

Public Member Functions

 findVariantLink (&$link, &$nt, $ignoreOtherCond=false)
 A function wrapper: More...
 
 loadDefaultTables ()
 Load default conversion tables. More...
 
 translate ( $text, $toVariant)
 It translates text into variant. More...
 
- Public Member Functions inherited from LanguageConverter
 __construct ( $langobj, $maincode, $variants=[], $variantfallbacks=[], $flags=[], $manualLevel=[])
 
 autoConvert ( $text, $toVariant=false)
 Dictionary-based conversion. More...
 
 autoConvertToAllVariants ( $text)
 Call translate() to convert text to all valid variants. More...
 
 convert ( $text)
 Convert text to different variants of a language. More...
 
 convertCategoryKey ( $key)
 Convert the sorting key for category links. More...
 
 convertNamespace ( $index, $variant=null)
 Get the namespace display name in the preferred variant. More...
 
 convertTitle ( $title)
 Auto convert a Title object to a readable string in the preferred variant. More...
 
 convertTo ( $text, $variant)
 Same as convert() except a extra parameter to custom variant. More...
 
 getConvRuleTitle ()
 Get the title produced by the conversion rule. More...
 
 getDefaultVariant ()
 Get default variant. More...
 
 getExtraHashOptions ()
 Returns language specific hash options. More...
 
 getPreferredVariant ()
 Get preferred language variant. More...
 
 getURLVariant ()
 Get the variant specified in the URL. More...
 
 getVariantFallbacks ( $variant)
 In case some variant is not defined in the markup, we need to have some fallback. More...
 
 getVariants ()
 Get all valid variants. More...
 
 getVarSeparatorPattern ()
 Get the cached separator pattern for ConverterRule::parseRules() More...
 
 guessVariant ( $text, $variant)
 Guess if a text is written in a variant. More...
 
 loadTables ( $fromCache=true)
 Load conversion tables either from the cache or the disk. More...
 
 markNoConversion ( $text, $noParse=false)
 Enclose a string with the "no conversion" tag. More...
 
 parseCachedTable ( $code, $subpage='', $recursive=true)
 Parse the conversion table stored in the cache. More...
 
 postLoadTables ()
 Hook for post processing after conversion tables are loaded. More...
 
 updateConversionTable (Title $titleobj)
 Refresh the cache of conversion tables when MediaWiki:Conversiontable* is updated. More...
 
 validateVariant ( $variant=null)
 Validate the variant. More...
 

Public Attributes

 $mToLatin
 
 $mToSyllabics
 
 $mUpperToLowerCaseLatin
 
- Public Attributes inherited from LanguageConverter
 $mConvRuleTitle = false
 
 $mDescCodeSep = ':'
 
 $mDescVarSep = ';'
 
 $mFlags
 
 $mHeaderVariant
 
 $mLangObj
 
 $mMainLanguageCode
 
 $mManualLevel
 
 $mMaxDepth = 10
 
 $mTables
 
 $mTablesLoaded = false
 
 $mUcfirst = false
 
 $mURLVariant
 
 $mUserVariant
 
 $mVariantFallbacks
 
 $mVariantNames
 
string[] $mVariants
 
 $mVarSeparatorPattern
 
const CACHE_VERSION_KEY = 'VERSION 7'
 

Protected Attributes

 $mDoContentConvert
 

Additional Inherited Members

- Static Public Attributes inherited from LanguageConverter
static array $languagesWithVariants
 languages supporting variants More...
 
- Protected Member Functions inherited from LanguageConverter
 applyManualConv ( $convRule)
 Apply manual conversion rules. More...
 
 getHeaderVariant ()
 Determine the language variant from the Accept-Language header. More...
 
 getUserVariant ()
 Determine if the user has a variant set. More...
 
 recursiveConvertRule ( $text, $variant, &$startPos, $depth=0)
 Recursively convert text on the inside. More...
 
 recursiveConvertTopLevel ( $text, $variant, $depth=0)
 Recursively convert text on the outside. More...
 

Detailed Description

Conversion script between Latin and Syllabics for Inuktitut.

  • Syllabics -> lowercase Latin
  • lowercase/uppercase Latin -> Syllabics

Based on:

Definition at line 36 of file LanguageIu.php.

Member Function Documentation

◆ findVariantLink()

IuConverter::findVariantLink ( $link,
$nt,
  $ignoreOtherCond = false 
)

A function wrapper:

  • if there is no selected variant, leave the link names as they were
  • do not try to find variants for usernames
Parameters
string&$link
Title&$nt
bool$ignoreOtherCond

Reimplemented from LanguageConverter.

Definition at line 109 of file LanguageIu.php.

References $link, LanguageConverter\getPreferredVariant(), NS_USER, and NS_USER_TALK.

◆ loadDefaultTables()

IuConverter::loadDefaultTables ( )

Load default conversion tables.

This method must be implemented in derived class.

Access:\n private
Exceptions
MWException

Reimplemented from LanguageConverter.

Definition at line 90 of file LanguageIu.php.

◆ translate()

IuConverter::translate (   $text,
  $toVariant 
)

It translates text into variant.

Parameters
string$text
bool$toVariant
Returns
string

Reimplemented from LanguageConverter.

Definition at line 133 of file LanguageIu.php.

References LanguageConverter\loadTables().

Member Data Documentation

◆ $mDoContentConvert

IuConverter::$mDoContentConvert
protected

Definition at line 37 of file LanguageIu.php.

◆ $mToLatin

IuConverter::$mToLatin
Initial value:
= [
'ᐦ' => 'h', 'ᐃ' => 'i', 'ᐄ' => 'ii', 'ᐅ' => 'u', 'ᐆ' => 'uu', 'ᐊ' => 'a', 'ᐋ' => 'aa',
'ᑉ' => 'p', 'ᐱ' => 'pi', 'ᐲ' => 'pii', 'ᐳ' => 'pu', 'ᐴ' => 'puu', 'ᐸ' => 'pa', 'ᐹ' => 'paa',
'ᑦ' => 't', 'ᑎ' => 'ti', 'ᑏ' => 'tii', 'ᑐ' => 'tu', 'ᑑ' => 'tuu', 'ᑕ' => 'ta', 'ᑖ' => 'taa',
'ᒃ' => 'k', 'ᑭ' => 'ki', 'ᑮ' => 'kii', 'ᑯ' => 'ku', 'ᑰ' => 'kuu', 'ᑲ' => 'ka', 'ᑳ' => 'kaa',
'ᖅᒃ' => 'qq', 'ᖅᑭ' => 'qqi', 'ᖅᑮ' => 'qqii', 'ᖅᑯ' => 'qqu', 'ᖅᑰ' => 'ᖅqquu', 'ᖅᑲ' => 'qqa',
'ᖅᑳ' => 'qqaa', 'ᒡ' => 'g', 'ᒋ' => 'gi', 'ᒌ' => 'gii', 'ᒍ' => 'gu', 'ᒎ' => 'guu',
'ᒐ' => 'ga', 'ᒑ' => 'gaa', 'ᒻ' => 'm', 'ᒥ' => 'mi', 'ᒦ' => 'mii', 'ᒧ' => 'mu', 'ᒨ' => 'muu',
'ᒪ' => 'ma', 'ᒫ' => 'maa', 'ᓐ' => 'n', 'ᓂ' => 'ni', 'ᓃ' => 'nii', 'ᓄ' => 'nu', 'ᓅ' => 'nuu',
'ᓇ' => 'na', 'ᓈ' => 'naa', 'ᔅ' => 's', 'ᓯ' => 'si', 'ᓰ' => 'sii', 'ᓱ' => 'su', 'ᓲ' => 'suu',
'ᓴ' => 'sa', 'ᓵ' => 'saa', 'ᓪ' => 'l', 'ᓕ' => 'li', 'ᓖ' => 'lii', 'ᓗ' => 'lu', 'ᓘ' => 'luu',
'ᓚ' => 'la', 'ᓛ' => 'laa', 'ᔾ' => 'j', 'ᔨ' => 'ji', 'ᔩ' => 'jii', 'ᔪ' => 'ju', 'ᔫ' => 'juu',
'ᔭ' => 'ja', 'ᔮ' => 'jaa', 'ᕝ' => 'v', 'ᕕ' => 'vi', 'ᕖ' => 'vii', 'ᕗ' => 'vu', 'ᕘ' => 'vuu',
'ᕙ' => 'va', 'ᕚ' => 'vaa', 'ᕐ' => 'r', 'ᕆ' => 'ri', 'ᕇ' => 'rii', 'ᕈ' => 'ru', 'ᕉ' => 'ruu',
'ᕋ' => 'ra', 'ᕌ' => 'raa', 'ᖅ' => 'q', 'ᕿ' => 'qi', 'ᖀ' => 'qii', 'ᖁ' => 'qu', 'ᖂ' => 'quu',
'ᖃ' => 'qa', 'ᖄ' => 'qaa', 'ᖕ' => 'ng', 'ᖏ' => 'ngi', 'ᖐ' => 'ngii', 'ᖑ' => 'ngu',
'ᖒ' => 'nguu', 'ᖓ' => 'nga', 'ᖔ' => 'ngaa', 'ᖖ' => 'nng', 'ᙱ' => 'nngi', 'ᙲ' => 'nngii',
'ᙳ' => 'nngu', 'ᙴ' => 'nnguu', 'ᙵ' => 'nnga', 'ᙶ' => 'nngaa', 'ᖦ' => 'ɫ', 'ᖠ' => 'ɫi',
'ᖡ' => 'ɫii', 'ᖢ' => 'ɫu', 'ᖣ' => 'ɫuu', 'ᖤ' => 'ɫa', 'ᖥ' => 'ɫaa',
]

Definition at line 39 of file LanguageIu.php.

◆ $mToSyllabics

IuConverter::$mToSyllabics
Initial value:
= [
'h' => 'ᐦ', 'i' => 'ᐃ', 'ii' => 'ᐄ', 'u' => 'ᐅ', 'uu' => 'ᐆ', 'a' => 'ᐊ', 'aa' => 'ᐋ',
'p' => 'ᑉ', 'pi' => 'ᐱ', 'pii' => 'ᐲ', 'pu' => 'ᐳ', 'puu' => 'ᐴ', 'pa' => 'ᐸ', 'paa' => 'ᐹ',
't' => 'ᑦ', 'ti' => 'ᑎ', 'tii' => 'ᑏ', 'tu' => 'ᑐ', 'tuu' => 'ᑑ', 'ta' => 'ᑕ', 'taa' => 'ᑖ',
'k' => 'ᒃ', 'ki' => 'ᑭ', 'kii' => 'ᑮ', 'ku' => 'ᑯ', 'kuu' => 'ᑰ', 'ka' => 'ᑲ', 'kaa' => 'ᑳ',
'g' => 'ᒡ', 'gi' => 'ᒋ', 'gii' => 'ᒌ', 'gu' => 'ᒍ', 'guu' => 'ᒎ', 'ga' => 'ᒐ', 'gaa' => 'ᒑ',
'm' => 'ᒻ', 'mi' => 'ᒥ', 'mii' => 'ᒦ', 'mu' => 'ᒧ', 'muu' => 'ᒨ', 'ma' => 'ᒪ', 'maa' => 'ᒫ',
'n' => 'ᓐ', 'ni' => 'ᓂ', 'nii' => 'ᓃ', 'nu' => 'ᓄ', 'nuu' => 'ᓅ', 'na' => 'ᓇ', 'naa' => 'ᓈ',
's' => 'ᔅ', 'si' => 'ᓯ', 'sii' => 'ᓰ', 'su' => 'ᓱ', 'suu' => 'ᓲ', 'sa' => 'ᓴ', 'saa' => 'ᓵ',
'l' => 'ᓪ', 'li' => 'ᓕ', 'lii' => 'ᓖ', 'lu' => 'ᓗ', 'luu' => 'ᓘ', 'la' => 'ᓚ', 'laa' => 'ᓛ',
'j' => 'ᔾ', 'ji' => 'ᔨ', 'jii' => 'ᔩ', 'ju' => 'ᔪ', 'juu' => 'ᔫ', 'ja' => 'ᔭ', 'jaa' => 'ᔮ',
'v' => 'ᕝ', 'vi' => 'ᕕ', 'vii' => 'ᕖ', 'vu' => 'ᕗ', 'vuu' => 'ᕘ', 'va' => 'ᕙ', 'vaa' => 'ᕚ',
'r' => 'ᕐ', 'ri' => 'ᕆ', 'rii' => 'ᕇ', 'ru' => 'ᕈ', 'ruu' => 'ᕉ', 'ra' => 'ᕋ', 'raa' => 'ᕌ',
'qq' => 'ᖅᒃ', 'qqi' => 'ᖅᑭ', 'qqii' => 'ᖅᑮ', 'qqu' => 'ᖅᑯ', 'qquu' => 'ᖅᑰ', 'qqa' => 'ᖅᑲ',
'qqaa' => 'ᖅᑳ', 'q' => 'ᖅ', 'qi' => 'ᕿ', 'qii' => 'ᖀ', 'qu' => 'ᖁ', 'quu' => 'ᖂ',
'qa' => 'ᖃ', 'qaa' => 'ᖄ', 'ng' => 'ᖕ', 'ngi' => 'ᖏ', 'ngii' => 'ᖐ', 'ngu' => 'ᖑ',
'nguu' => 'ᖒ', 'nga' => 'ᖓ', 'ngaa' => 'ᖔ', 'nng' => 'ᖖ', 'nngi' => 'ᙱ', 'nngii' => 'ᙲ',
'nngu' => 'ᙳ', 'nnguu' => 'ᙴ', 'nnga' => 'ᙵ', 'nngaa' => 'ᙶ', 'ɫ' => 'ᖦ', 'ɫi' => 'ᖠ',
'ɫii' => 'ᖡ', 'ɫu' => 'ᖢ', 'ɫuu' => 'ᖣ', 'ɫa' => 'ᖤ', 'ɫaa' => 'ᖥ',
]

Definition at line 69 of file LanguageIu.php.

◆ $mUpperToLowerCaseLatin

IuConverter::$mUpperToLowerCaseLatin
Initial value:
= [
'A' => 'a', 'B' => 'b', 'C' => 'c', 'D' => 'd', 'E' => 'e',
'F' => 'f', 'G' => 'g', 'H' => 'h', 'I' => 'i', 'J' => 'j',
'K' => 'k', 'L' => 'l', 'M' => 'm', 'N' => 'n', 'O' => 'o',
'P' => 'p', 'Q' => 'q', 'R' => 'r', 'S' => 's', 'T' => 't',
'U' => 'u', 'V' => 'v', 'W' => 'w', 'X' => 'x', 'Y' => 'y',
'Z' => 'z',
]

Definition at line 60 of file LanguageIu.php.


The documentation for this class was generated from the following file: