config_script2lang.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <?php
  2. $this->script2lang = array(
  3. /* European */
  4. UCDN::SCRIPT_LATIN => 'und-Latn',
  5. UCDN::SCRIPT_ARMENIAN => 'hy',
  6. UCDN::SCRIPT_CYRILLIC => 'und-Cyrl',
  7. UCDN::SCRIPT_GEORGIAN => 'ka',
  8. UCDN::SCRIPT_GREEK => 'el',
  9. UCDN::SCRIPT_COPTIC => 'cop',
  10. UCDN::SCRIPT_GOTHIC => 'got',
  11. UCDN::SCRIPT_CYPRIOT => 'und-Cprt',
  12. UCDN::SCRIPT_GLAGOLITIC => 'und-Glag',
  13. UCDN::SCRIPT_LINEAR_B => 'und-Linb',
  14. UCDN::SCRIPT_OGHAM => 'und-Ogam',
  15. UCDN::SCRIPT_OLD_ITALIC => 'und-Ital',
  16. UCDN::SCRIPT_RUNIC => 'und-Runr',
  17. UCDN::SCRIPT_SHAVIAN => 'und-Shaw',
  18. /* African */
  19. UCDN::SCRIPT_ETHIOPIC => 'und-Ethi',
  20. UCDN::SCRIPT_NKO => 'nqo',
  21. UCDN::SCRIPT_BAMUM => 'bax',
  22. UCDN::SCRIPT_VAI => 'vai',
  23. UCDN::SCRIPT_EGYPTIAN_HIEROGLYPHS => 'und-Egyp',
  24. UCDN::SCRIPT_MEROITIC_CURSIVE => 'und-Merc',
  25. UCDN::SCRIPT_MEROITIC_HIEROGLYPHS => 'und-Mero',
  26. UCDN::SCRIPT_OSMANYA => 'und-Osma',
  27. UCDN::SCRIPT_TIFINAGH => 'und-Tfng',
  28. /* Middle Eastern */
  29. UCDN::SCRIPT_ARABIC => 'und-Arab',
  30. UCDN::SCRIPT_HEBREW => 'he',
  31. UCDN::SCRIPT_SYRIAC => 'syr',
  32. UCDN::SCRIPT_IMPERIAL_ARAMAIC => 'arc',
  33. UCDN::SCRIPT_AVESTAN => 'ae',
  34. UCDN::SCRIPT_CARIAN => 'xcr',
  35. UCDN::SCRIPT_LYCIAN => 'xlc',
  36. UCDN::SCRIPT_LYDIAN => 'xld',
  37. UCDN::SCRIPT_MANDAIC => 'mid',
  38. UCDN::SCRIPT_OLD_PERSIAN => 'peo',
  39. UCDN::SCRIPT_PHOENICIAN => 'phn',
  40. UCDN::SCRIPT_SAMARITAN => 'smp',
  41. UCDN::SCRIPT_UGARITIC => 'uga',
  42. UCDN::SCRIPT_CUNEIFORM => 'und-Xsux',
  43. UCDN::SCRIPT_OLD_SOUTH_ARABIAN => 'und-Sarb',
  44. UCDN::SCRIPT_INSCRIPTIONAL_PARTHIAN => 'und-Prti',
  45. UCDN::SCRIPT_INSCRIPTIONAL_PAHLAVI => 'und-Phli',
  46. /* Central Asian */
  47. UCDN::SCRIPT_MONGOLIAN => 'mn',
  48. UCDN::SCRIPT_TIBETAN => 'bo',
  49. UCDN::SCRIPT_OLD_TURKIC => 'und-Orkh',
  50. UCDN::SCRIPT_PHAGS_PA => 'und-Phag',
  51. /* South Asian */
  52. UCDN::SCRIPT_BENGALI => 'bn',
  53. UCDN::SCRIPT_DEVANAGARI => 'hi',
  54. UCDN::SCRIPT_GUJARATI => 'gu',
  55. UCDN::SCRIPT_GURMUKHI => 'pa',
  56. UCDN::SCRIPT_KANNADA => 'kn',
  57. UCDN::SCRIPT_MALAYALAM => 'ml',
  58. UCDN::SCRIPT_ORIYA => 'or',
  59. UCDN::SCRIPT_SINHALA => 'si',
  60. UCDN::SCRIPT_TAMIL => 'ta',
  61. UCDN::SCRIPT_TELUGU => 'te',
  62. UCDN::SCRIPT_CHAKMA => 'ccp',
  63. UCDN::SCRIPT_LEPCHA => 'lep',
  64. UCDN::SCRIPT_LIMBU => 'lif',
  65. UCDN::SCRIPT_OL_CHIKI => 'sat',
  66. UCDN::SCRIPT_SAURASHTRA => 'saz',
  67. UCDN::SCRIPT_SYLOTI_NAGRI => 'syl',
  68. UCDN::SCRIPT_TAKRI => 'dgo',
  69. UCDN::SCRIPT_THAANA => 'dv',
  70. UCDN::SCRIPT_BRAHMI => 'und-Brah',
  71. UCDN::SCRIPT_KAITHI => 'und-Kthi',
  72. UCDN::SCRIPT_KHAROSHTHI => 'und-Khar',
  73. UCDN::SCRIPT_MEETEI_MAYEK => 'und-Mtei', /* or omp-Mtei */
  74. UCDN::SCRIPT_SHARADA => 'und-Shrd',
  75. UCDN::SCRIPT_SORA_SOMPENG => 'und-Sora',
  76. /* South East Asian */
  77. UCDN::SCRIPT_KHMER => 'km',
  78. UCDN::SCRIPT_LAO => 'lo',
  79. UCDN::SCRIPT_MYANMAR => 'my',
  80. UCDN::SCRIPT_THAI => 'th',
  81. UCDN::SCRIPT_BALINESE => 'ban',
  82. UCDN::SCRIPT_BATAK => 'bya',
  83. UCDN::SCRIPT_BUGINESE => 'bug',
  84. UCDN::SCRIPT_CHAM => 'cjm',
  85. UCDN::SCRIPT_JAVANESE => 'jv',
  86. UCDN::SCRIPT_KAYAH_LI => 'und-Kali',
  87. UCDN::SCRIPT_REJANG => 'und-Rjng',
  88. UCDN::SCRIPT_SUNDANESE => 'su',
  89. UCDN::SCRIPT_TAI_LE => 'tdd',
  90. UCDN::SCRIPT_TAI_THAM => 'und-Lana',
  91. UCDN::SCRIPT_TAI_VIET => 'blt',
  92. UCDN::SCRIPT_NEW_TAI_LUE => 'und-Talu',
  93. /* Phillipine */
  94. UCDN::SCRIPT_BUHID => 'bku',
  95. UCDN::SCRIPT_HANUNOO => 'hnn',
  96. UCDN::SCRIPT_TAGALOG => 'tl',
  97. UCDN::SCRIPT_TAGBANWA => 'tbw',
  98. /* East Asian */
  99. UCDN::SCRIPT_HAN => 'und-Hans', // und-Hans (simplified) or und-Hant (Traditional)
  100. UCDN::SCRIPT_HANGUL => 'ko',
  101. UCDN::SCRIPT_HIRAGANA => 'ja',
  102. UCDN::SCRIPT_KATAKANA => 'ja',
  103. UCDN::SCRIPT_LISU => 'lis',
  104. UCDN::SCRIPT_BOPOMOFO => 'und-Bopo', // zh-CN, zh-TW, zh-HK
  105. UCDN::SCRIPT_MIAO => 'und-Plrd',
  106. UCDN::SCRIPT_YI => 'und-Yiii',
  107. /* American */
  108. UCDN::SCRIPT_CHEROKEE => 'chr',
  109. UCDN::SCRIPT_CANADIAN_ABORIGINAL => 'cr',
  110. UCDN::SCRIPT_DESERET => 'und-Dsrt',
  111. /* Other */
  112. UCDN::SCRIPT_BRAILLE => 'und-Brai',
  113. );
  114. // Used in mpdf.php function AutoFont() to detect specific languages:
  115. // VIETNAMESE
  116. $this->viet = "\x{01A0}\x{01A1}\x{01AF}\x{01B0}\x{1EA0}-\x{1EF1}";
  117. // PASHTO, SINDHI, URDU, ARABIC, PERSIAN
  118. $this->persian = "\x{067E}\x{0686}\x{0698}\x{06AF}";
  119. $this->urdu = "\x{0679}\x{0688}\x{0691}\x{06BA}\x{06BE}\x{06C1}\x{06D2}";
  120. $this->pashto = "\x{067C}\x{0681}\x{0685}\x{0689}\x{0693}\x{0696}\x{069A}\x{06BC}\x{06D0}"; // ? and U+06AB, U+06CD
  121. $this->sindhi = "\x{067A}\x{067B}\x{067D}\x{067F}\x{0680}\x{0684}\x{068D}\x{068A}\x{068F}\x{068C}\x{0687}\x{0683}\x{0699}\x{06AA}\x{06A6}\x{06BB}\x{06B1}\x{06B3}";