| 1 |
<?php |
| 2 |
|
| 3 |
use MediaWiki\Language\LanguageConverter; |
| 4 |
use MediaWiki\Language\ReplacementArray; |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
class DummyConverter extends LanguageConverter { |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
private $table = [ |
| 15 |
'б' => 'b', |
| 16 |
'в' => 'v', |
| 17 |
'г' => 'g', |
| 18 |
]; |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
public function getMainCode(): string { |
| 26 |
return 'tg'; |
| 27 |
} |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
public function getLanguageVariants(): array { |
| 35 |
return [ 'tg', 'tg-latn', 'sgs', 'simple' ]; |
| 36 |
} |
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
public function getVariantsFallbacks(): array { |
| 44 |
return []; |
| 45 |
} |
| 46 |
|
| 47 |
public function loadDefaultTables(): array { |
| 48 |
return [ |
| 49 |
'sgs' => new ReplacementArray(), |
| 50 |
'simple' => new ReplacementArray(), |
| 51 |
'tg-latn' => new ReplacementArray( $this->table ), |
| 52 |
'tg' => new ReplacementArray() |
| 53 |
]; |
| 54 |
} |
| 55 |
} |