45 $text = parent::translate( $text, $variant );
46 if ( trim( $text ) ) {
77 if ( $this->mTransliterators ===
null ) {
78 $this->mTransliterators = [];
79 foreach ( $this->
getIcuRules() as $variant => $rule ) {
80 $this->mTransliterators[$variant] = Transliterator::createFromRules( $rule );
83 $this->mTransliterators[$alias] = $this->mTransliterators[$variant];
A class that extends LanguageConverterSpecific for converts that use ICU rule-based transliterators.
icuTranslate( $text, $variant)
Translate a string to a variant using ICU transliterator.
getIcuRules()
Get the array mapping variants to ICU transliteration rules.
Transliterator[] $mTransliterators
getTransliterators()
Get the array mapping variants to ICU transliterators.
loadDefaultTables()
Creates empty tables.
translate( $text, $variant)
Translate a string to a variant.
getTransliteratorAliases()
Get the array mapping variant aliases to main variant.
A class that extends LanguageConverter with specific behaviour.
getVariants()
Get all valid variants for current Converter.
Wrapper around strtr() that holds replacements.