LanguageTg.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?php
  2. require_once( dirname(__FILE__).'/../LanguageConverter.php' );
  3. /**
  4. * Converts Tajiki to latin orthography
  5. * @ingroup Language
  6. */
  7. class TgConverter extends LanguageConverter {
  8. private $table = array(
  9. 'а' => 'a',
  10. 'б' => 'b',
  11. 'в' => 'v',
  12. 'г' => 'g',
  13. 'д' => 'd',
  14. 'е' => 'e',
  15. 'ё' => 'jo',
  16. 'ж' => 'ƶ',
  17. 'з' => 'z',
  18. 'ии ' => 'iji ',
  19. 'и' => 'i',
  20. 'й' => 'j',
  21. 'к' => 'k',
  22. 'л' => 'l',
  23. 'м' => 'm',
  24. 'н' => 'n',
  25. 'о' => 'o',
  26. 'п' => 'p',
  27. 'р' => 'r',
  28. 'с' => 's',
  29. 'т' => 't',
  30. 'у' => 'u',
  31. 'ф' => 'f',
  32. 'х' => 'x',
  33. 'ч' => 'c',
  34. 'ш' => 'ş',
  35. 'ъ' => '\'',
  36. 'э' => 'e',
  37. 'ю' => 'ju',
  38. 'я' => 'ja',
  39. 'ғ' => 'ƣ',
  40. 'ӣ' => 'ī',
  41. 'қ' => 'q',
  42. 'ӯ' => 'ū',
  43. 'ҳ' => 'h',
  44. 'ҷ' => 'ç',
  45. 'ц' => 'ts',
  46. 'А' => 'A',
  47. 'Б' => 'B',
  48. 'В' => 'V',
  49. 'Г' => 'G',
  50. 'Д' => 'D',
  51. 'Е' => 'E',
  52. 'Ё' => 'Jo',
  53. 'Ж' => 'Ƶ',
  54. 'З' => 'Z',
  55. 'И' => 'I',
  56. 'Й' => 'J',
  57. 'К' => 'K',
  58. 'Л' => 'L',
  59. 'М' => 'M',
  60. 'Н' => 'N',
  61. 'О' => 'O',
  62. 'П' => 'P',
  63. 'Р' => 'R',
  64. 'С' => 'S',
  65. 'Т' => 'T',
  66. 'У' => 'U',
  67. 'Ф' => 'F',
  68. 'Х' => 'X',
  69. 'Ч' => 'C',
  70. 'Ш' => 'Ş',
  71. 'Ъ' => '\'',
  72. 'Э' => 'E',
  73. 'Ю' => 'Ju',
  74. 'Я' => 'Ja',
  75. 'Ғ' => 'Ƣ',
  76. 'Ӣ' => 'Ī',
  77. 'Қ' => 'Q',
  78. 'Ӯ' => 'Ū',
  79. 'Ҳ' => 'H',
  80. 'Ҷ' => 'Ç',
  81. 'Ц' => 'Ts',
  82. );
  83. function loadDefaultTables() {
  84. $this->mTables = array(
  85. 'tg-latn' => new ReplacementArray( $this->table ),
  86. 'tg' => new ReplacementArray()
  87. );
  88. }
  89. }
  90. /**
  91. * @ingroup Language
  92. */
  93. class LanguageTg extends Language {
  94. function __construct() {
  95. parent::__construct();
  96. $variants = array( 'tg', 'tg-latn' );
  97. $this->mConverter = new TgConverter( $this, 'tg', $variants );
  98. }
  99. }