-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhtmllanguage.mata
205 lines (190 loc) · 4.72 KB
/
htmllanguage.mata
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
// Start Mata session/interpreter/compiler
mata:
// Drops class from Mata if loaded
// mata drop htmllanguage
// Defines class to store HTML language codes
class htmllanguage {
// Make members public
public:
// Make the matrix immutable
static final string matrix langcodes
// Define a constructor method
void new()
} // End of Class definition
// Class constructor method
void htmllanguage::new() {
// HTML Language codes are broken into three temp matrices and combined at
// the end of the method
string matrix tmp1, tmp2, tmp3
// Language codes for languages A-G
tmp1 = ("Abkhazian", "ab", "" \
"Afar", "aa", "" \
"Afrikaans", "af", "" \
"Albanian", "sq", "" \
"Amharic", "am", "" \
"Arabic", "ar", "" \
"Aragonese", "an", "" \
"Armenian", "hy", "" \
"Assamese", "as", "" \
"Aymara", "ay", "" \
"Azerbaijani", "az", "" \
"Bashkir", "ba", "" \
"Basque", "eu", "" \
"Bengali (Bangla)", "bn", "" \
"Bhutani", "dz", "" \
"Bihari", "bh", "" \
"Bislama", "bi", "" \
"Breton", "br", "" \
"Bulgarian", "bg", "" \
"Burmese", "my", "" \
"Byelorussian (Belarusian)", "be", "" \
"Cambodian", "km", "" \
"Catalan", "ca", "" \
"Cherokee", "", "" \
"Chewa", "", "" \
"Chinese", "zh", "" \
"Chinese (Simplified)", "zh-Hans", "" \
"Chinese (Traditional)", "zh-Hant", "" \
"Corsican", "co", "" \
"Croatian", "hr", "" \
"Czech", "cs", "" \
"Danish", "da", "" \
"Divehi", "", "" \
"Dutch", "nl", "" \
"Edo", "", "" \
"English", "en", "" \
"Esperanto", "eo", "" \
"Estonian", "et", "" \
"Faeroese", "fo", "" \
"Farsi", "fa", "" \
"Fiji", "fj", "" \
"Finnish", "fi", "" \
"Flemish", "", "" \
"French", "fr", "" \
"Frisian", "fy", "" \
"Fulfulde", "", "" \
"Galician", "gl", "" \
"Gaelic (Scottish)", "gd", "" \
"Gaelic (Manx)", "gv", "" \
"Georgian", "ka", "" \
"German", "de", "" \
"Greek", "el", "" \
"Greenlandic", "kl", "" \
"Guarani", "gn", "" \
"Gujarati", "gu", "")
// Language codes for languages H-P
tmp2 = ("Haitian Creole", "ht", "" \
"Hausa", "ha", "" \
"Hawaiian", "", "" \
"Hebrew", "he", "iw" \
"Hindi", "hi", "" \
"Hungarian", "hu", "" \
"Ibibio", "", "" \
"Icelandic", "is", "" \
"Ido", "io", "" \
"Igbo", "", "" \
"Indonesian", "id", "in" \
"Interlingua", "ia", "" \
"Interlingue", "ie", "" \
"Inuktitut", "iu", "" \
"Inupiak", "ik", "" \
"Irish", "ga", "" \
"Italian", "it", "" \
"Japanese", "ja", "" \
"Javanese", "jv", "" \
"Kannada", "kn", "" \
"Kanuri", "", "" \
"Kashmiri", "ks", "" \
"Kazakh", "kk", "" \
"Kinyarwanda (Ruanda)", "rw", "" \
"Kirghiz", "ky", "" \
"Kirundi (Rundi)", "rn", "" \
"Konkani", "", "" \
"Korean", "ko", "" \
"Kurdish", "ku", "" \
"Laothian", "lo", "" \
"Latin", "la", "" \
"Latvian (Lettish)", "lv", "" \
"Limburgish (Limburger)", "li", "" \
"Lingala", "ln", "" \
"Lithuanian", "lt", "" \
"Macedonian", "mk", "" \
"Malagasy", "mg", "" \
"Malay", "ms", "" \
"Malayalam", "ml", "" \
"Maltese", "mt", "" \
"Maori", "mi", "" \
"Marathi", "mr", "" \
"Moldavian", "mo", "" \
"Mongolian", "mn", "" \
"Nauru", "na", "" \
"Nepali", "ne", "" \
"Norwegian", "no", "" \
"Occitan", "oc", "" \
"Oriya", "or", "" \
"Oromo (AfaanOromo)", "om", "" \
"Papiamentu", "", "" \
"Pashto (Pushto)", "ps", "" \
"Polish", "pl", "" \
"Portuguese", "pt", "" \
"Punjabi", "pa", "")
// Language Codes for languages Q-Z
tmp3 = ("Quechua", "qu", "" \
"Rhaeto-Romance", "rm", "" \
"Romanian", "ro", "" \
"Russian", "ru", "" \
"Sami (Lappish)", "", "" \
"Samoan", "sm", "" \
"Sangro", "sg", "" \
"Sanskrit", "sa", "" \
"Serbian", "sr", "" \
"Serbo-Croatian", "sh", "" \
"Sesotho", "st", "" \
"Setswana", "tn", "" \
"Shona", "sn", "" \
"Sichuan Yi", "ii", "" \
"Sindhi", "sd", "" \
"Sinhalese", "si", "" \
"Siswati", "ss", "" \
"Slovak", "sk", "" \
"Slovenian", "sl", "" \
"Somali", "so", "" \
"Spanish", "es", "" \
"Sundanese", "su", "" \
"Swahili (Kiswahili)", "sw", "" \
"Swedish", "sv", "" \
"Syriac", "", "" \
"Tagalog", "tl", "" \
"Tajik", "tg", "" \
"Tamazight", "", "" \
"Tamil", "ta", "" \
"Tatar", "tt", "" \
"Telugu", "te", "" \
"Thai", "th", "" \
"Tibetan", "bo", "" \
"Tigrinya", "ti", "" \
"Tonga", "to", "" \
"Tsonga", "ts", "" \
"Turkish", "tr", "" \
"Turkmen", "tk", "" \
"Twi", "tw", "" \
"Uighur", "ug", "" \
"Ukrainian", "uk", "" \
"Urdu", "ur", "" \
"Uzbek", "uz", "" \
"Venda", "", "" \
"Vietnamese", "vi", "" \
"Volapük", "vo", "" \
"Wallon", "wa", "" \
"Welsh", "cy", "" \
"Wolof", "wo", "" \
"Xhosa", "xh", "" \
"Yi", "", "" \
"Yiddish", "yi", "ji" \
"Yoruba", "yo", "" \
"Zulu", "zu", "" )
// Combine all of the temporary matrices into the langcodes member variable for the class
this.langcodes = (tmp1 \ tmp2 \ tmp3)
} // End Constructor method for htmllanguage class
// End Mata session and return to Stata
end