-
Notifications
You must be signed in to change notification settings - Fork 5
/
lang.py
executable file
·148 lines (146 loc) · 3.18 KB
/
lang.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# -*- coding: utf-8 -*-
HTML_LANG = {
'ab': 'Abkhazian',
'aa': 'Afar',
'af': 'Afrikaans',
'sq': 'Albanian',
'am': 'Amharic',
'ar': 'Arabic',
'hy': 'Armenian',
'as': 'Assamese',
'ay': 'Aymara',
'az': 'Azerbaijani',
'ba': 'Bashkir',
'eu': 'Basque',
'bn': 'Bengali(Bangla)',
'dz': 'Bhutani',
'bh': 'Bihari',
'bi': 'Bislama',
'br': 'Breton',
'bg': 'Bulgarian',
'my': 'Burmese',
'be': 'Byelorussian (Belarusian)',
'km': 'Cambodian',
'ca': 'Catalan',
'zh': 'Chinese (Simplified)',
'zh': 'Chinese (Traditional)',
'co': 'Corsican',
'hr': 'Croatian',
'cs': 'Czech',
'da': 'Danish',
'nl': 'Dutch',
'en': 'English',
'eo': 'Esperanto',
'et': 'Estonian',
'fo': 'Faeroese',
'fa': 'Farsi',
'fj': 'Fiji',
'fi': 'Finnish',
'fr': 'French',
'fy': 'Frisian',
'gl': 'Galician',
'gd': 'Gaelic (Scottish)',
'gv': 'Gaelic (Manx)',
'ka': 'Georgian',
'de': 'German',
'el': 'Greek',
'kl': 'Greenlandic',
'gn': 'Guarani',
'gu': 'Gujarati',
'ha': 'Hausa',
'he': 'Hebrew',
'hi': 'Hindi',
'hu': 'Hungarian',
'is': 'Icelandic',
'id': 'Indonesian',
'ia': 'Interlingua',
'ie': 'Interlingue',
'iu': 'Inuktitut',
'ik': 'Inupiak',
'ga': 'Irish',
'it': 'Italian',
'ja': 'Japanese',
'jv': 'Javanese',
'kn': 'Kannada',
'ks': 'Kashmiri',
'kk': 'Kazakh',
'rw': 'Kinyarwanda(Ruanda)',
'ky': 'Kirghiz',
'rn': 'Kirundi(Rundi)',
'ko': 'Korean',
'ku': 'Kurdish',
'lo': 'Laothian',
'la': 'Latin',
'lv': 'Latvian(Lettish)',
'li': 'Limburgish( Limburger)',
'ln': 'Lingala',
'lt': 'Lithuanian',
'mk': 'Macedonian',
'mg': 'Malagasy',
'ms': 'Malay',
'ml': 'Malayalam',
'mt': 'Maltese',
'mi': 'Maori',
'mr': 'Marathi',
'mo': 'Moldavian',
'mn': 'Mongolian',
'na': 'Nauru',
'ne': 'Nepali',
'no': 'Norwegian',
'oc': 'Occitan',
'or': 'Oriya',
'om': 'Oromo (Afan, Galla)',
'ps': 'Pashto (Pushto)',
'pl': 'Polish',
'pt': 'Portuguese',
'pa': 'Punjabi',
'qu': 'Quechua',
'rm': 'Rhaeto-Romance',
'ro': 'Romanian',
'ru': 'Russian',
'sm': 'Samoan',
'sg': 'Sangro',
'sa': 'Sanskrit',
'sr': 'Serbian',
'sh': 'Serbo-Croatian',
'st': 'Sesotho',
'tn': 'Setswana',
'sn': 'Shona',
'sd': 'Sindhi',
'si': 'Sinhalese',
'ss': 'Siswati',
'sk': 'Slovak',
'sl': 'Slovenian',
'so': 'Somali',
'es': 'Spanish',
'su': 'Sundanese',
'sw': 'Swahili (Kiswahili)',
'sv': 'Swedish',
'tl': 'Tagalog',
'tg': 'Tajik',
'ta': 'Tamil',
'tt': 'Tatar',
'te': 'Telugu',
'th': 'Thai',
'bo': 'Tibetan',
'ti': 'Tigrinya',
'to': 'Tonga',
'ts': 'Tsonga',
'tr': 'Turkish',
'tk': 'Turkmen',
'tw': 'Twi',
'ug': 'Uighur',
'uk': 'Ukrainian',
'ur': 'Urdu',
'uz': 'Uzbek',
'vi': 'Vietnamese',
'vo': 'Volapük',
'cy': 'Welsh',
'wo': 'Wolof',
'xh': 'Xhosa',
'yi': 'Yiddish',
'yo': 'Yoruba',
'zu': 'Zulu',
}
RTL = ['ar', 'he', 'ps', 'ur']
DIR_CHOICES = {'RTL': 'Right to Left', 'LTR': 'Left to Right'}