forked from klauspost/cld2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
languages.go
1915 lines (1901 loc) · 67.5 KB
/
languages.go
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package cld2
import "strings"
// Single Language estimate
type Estimate struct {
Language Language
Percent int // text percentage 0..100 of the top 3 languages.
// NormScore is internal language scores as a ratio to normal score for real text in that language.
// Scores close to 1.0 indicate normal text, while scores far away
// from 1.0 indicate badly-skewed text or gibberish.
NormScore float64
}
// Language is a single language.
// Note that the zero value is "ENGLISH".
type Language uint16
// Languages are probable languages of the supplied text
type Languages struct {
Estimates []Estimate // Possible languages returned in order of confidence
TextBytes int // the amount of non-tag/letters-only text found
Reliable bool // Does CLD2 see the result as reliable?
}
func (l Language) String() string {
return strings.Replace(strings.Title(strings.ToLower(languageToCName[int(l)])), "_", " ", -1)
}
func (l Language) Code() string {
return languageToCode[int(l)]
}
// NewLanguage supplies a safe way of returning a uint16
// to a Language.
// If an invalid id is supplied, UNKNOWN_LANGUAGE is returned.
func NewLanguage(id uint16) Language {
if id >= uint16(NUM_LANGUAGES) {
return UNKNOWN_LANGUAGE
}
return Language(id)
}
// LanguageFromCode returns the language associated with the
// code. Returns UNKNOWN_LANGUAGE if the code isn't known.
func LanguageFromCode(code string) Language {
if l, ok := codeToLanguage[code]; ok {
return l
}
return UNKNOWN_LANGUAGE
}
// Copied from "generated_language.h"
const (
ENGLISH Language = 0 // en
DANISH Language = 1 // da
DUTCH Language = 2 // nl
FINNISH Language = 3 // fi
FRENCH Language = 4 // fr
GERMAN Language = 5 // de
HEBREW Language = 6 // iw
ITALIAN Language = 7 // it
JAPANESE Language = 8 // ja
KOREAN Language = 9 // ko
NORWEGIAN Language = 10 // no
POLISH Language = 11 // pl
PORTUGUESE Language = 12 // pt
RUSSIAN Language = 13 // ru
SPANISH Language = 14 // es
SWEDISH Language = 15 // sv
CHINESE Language = 16 // zh
CZECH Language = 17 // cs
GREEK Language = 18 // el
ICELANDIC Language = 19 // is
LATVIAN Language = 20 // lv
LITHUANIAN Language = 21 // lt
ROMANIAN Language = 22 // ro
HUNGARIAN Language = 23 // hu
ESTONIAN Language = 24 // et
TG_UNKNOWN_LANGUAGE Language = 25 // xxx
UNKNOWN_LANGUAGE Language = 26 // un
BULGARIAN Language = 27 // bg
CROATIAN Language = 28 // hr
SERBIAN Language = 29 // sr
IRISH Language = 30 // ga
GALICIAN Language = 31 // gl
TAGALOG Language = 32 // tl
TURKISH Language = 33 // tr
UKRAINIAN Language = 34 // uk
HINDI Language = 35 // hi
MACEDONIAN Language = 36 // mk
BENGALI Language = 37 // bn
INDONESIAN Language = 38 // id
LATIN Language = 39 // la
MALAY Language = 40 // ms
MALAYALAM Language = 41 // ml
WELSH Language = 42 // cy
NEPALI Language = 43 // ne
TELUGU Language = 44 // te
ALBANIAN Language = 45 // sq
TAMIL Language = 46 // ta
BELARUSIAN Language = 47 // be
JAVANESE Language = 48 // jw
OCCITAN Language = 49 // oc
URDU Language = 50 // ur
BIHARI Language = 51 // bh
GUJARATI Language = 52 // gu
THAI Language = 53 // th
ARABIC Language = 54 // ar
CATALAN Language = 55 // ca
ESPERANTO Language = 56 // eo
BASQUE Language = 57 // eu
INTERLINGUA Language = 58 // ia
KANNADA Language = 59 // kn
PUNJABI Language = 60 // pa
SCOTS_GAELIC Language = 61 // gd
SWAHILI Language = 62 // sw
SLOVENIAN Language = 63 // sl
MARATHI Language = 64 // mr
MALTESE Language = 65 // mt
VIETNAMESE Language = 66 // vi
FRISIAN Language = 67 // fy
SLOVAK Language = 68 // sk
CHINESE_T Language = 69 // zh-Hant
FAROESE Language = 70 // fo
SUNDANESE Language = 71 // su
UZBEK Language = 72 // uz
AMHARIC Language = 73 // am
AZERBAIJANI Language = 74 // az
GEORGIAN Language = 75 // ka
TIGRINYA Language = 76 // ti
PERSIAN Language = 77 // fa
BOSNIAN Language = 78 // bs
SINHALESE Language = 79 // si
NORWEGIAN_N Language = 80 // nn
X_81 Language = 81 //
X_82 Language = 82 //
XHOSA Language = 83 // xh
ZULU Language = 84 // zu
GUARANI Language = 85 // gn
SESOTHO Language = 86 // st
TURKMEN Language = 87 // tk
KYRGYZ Language = 88 // ky
BRETON Language = 89 // br
TWI Language = 90 // tw
YIDDISH Language = 91 // yi
X_92 Language = 92 //
SOMALI Language = 93 // so
UIGHUR Language = 94 // ug
KURDISH Language = 95 // ku
MONGOLIAN Language = 96 // mn
ARMENIAN Language = 97 // hy
LAOTHIAN Language = 98 // lo
SINDHI Language = 99 // sd
RHAETO_ROMANCE Language = 100 // rm
AFRIKAANS Language = 101 // af
LUXEMBOURGISH Language = 102 // lb
BURMESE Language = 103 // my
KHMER Language = 104 // km
TIBETAN Language = 105 // bo
DHIVEHI Language = 106 // dv
CHEROKEE Language = 107 // chr
SYRIAC Language = 108 // syr
LIMBU Language = 109 // lif
ORIYA Language = 110 // or
ASSAMESE Language = 111 // as
CORSICAN Language = 112 // co
INTERLINGUE Language = 113 // ie
KAZAKH Language = 114 // kk
LINGALA Language = 115 // ln
X_116 Language = 116 //
PASHTO Language = 117 // ps
QUECHUA Language = 118 // qu
SHONA Language = 119 // sn
TAJIK Language = 120 // tg
TATAR Language = 121 // tt
TONGA Language = 122 // to
YORUBA Language = 123 // yo
X_124 Language = 124 //
X_125 Language = 125 //
X_126 Language = 126 //
X_127 Language = 127 //
MAORI Language = 128 // mi
WOLOF Language = 129 // wo
ABKHAZIAN Language = 130 // ab
AFAR Language = 131 // aa
AYMARA Language = 132 // ay
BASHKIR Language = 133 // ba
BISLAMA Language = 134 // bi
DZONGKHA Language = 135 // dz
FIJIAN Language = 136 // fj
GREENLANDIC Language = 137 // kl
HAUSA Language = 138 // ha
HAITIAN_CREOLE Language = 139 // ht
INUPIAK Language = 140 // ik
INUKTITUT Language = 141 // iu
KASHMIRI Language = 142 // ks
KINYARWANDA Language = 143 // rw
MALAGASY Language = 144 // mg
NAURU Language = 145 // na
OROMO Language = 146 // om
RUNDI Language = 147 // rn
SAMOAN Language = 148 // sm
SANGO Language = 149 // sg
SANSKRIT Language = 150 // sa
SISWANT Language = 151 // ss
TSONGA Language = 152 // ts
TSWANA Language = 153 // tn
VOLAPUK Language = 154 // vo
ZHUANG Language = 155 // za
KHASI Language = 156 // kha
SCOTS Language = 157 // sco
GANDA Language = 158 // lg
MANX Language = 159 // gv
MONTENEGRIN Language = 160 // sr-ME
AKAN Language = 161 // ak
IGBO Language = 162 // ig
MAURITIAN_CREOLE Language = 163 // mfe
HAWAIIAN Language = 164 // haw
CEBUANO Language = 165 // ceb
EWE Language = 166 // ee
GA Language = 167 // gaa
HMONG Language = 168 // blu
KRIO Language = 169 // kri
LOZI Language = 170 // loz
LUBA_LULUA Language = 171 // lua
LUO_KENYA_AND_TANZANIA Language = 172 // luo
NEWARI Language = 173 // new
NYANJA Language = 174 // ny
OSSETIAN Language = 175 // os
PAMPANGA Language = 176 // pam
PEDI Language = 177 // nso
RAJASTHANI Language = 178 // raj
SESELWA Language = 179 // crs
TUMBUKA Language = 180 // tum
VENDA Language = 181 // ve
WARAY_PHILIPPINES Language = 182 // war
X_183 Language = 183 //
X_184 Language = 184 //
X_185 Language = 185 //
X_186 Language = 186 //
X_187 Language = 187 //
X_188 Language = 188 //
X_189 Language = 189 //
X_190 Language = 190 //
X_191 Language = 191 //
X_192 Language = 192 //
X_193 Language = 193 //
X_194 Language = 194 //
X_195 Language = 195 //
X_196 Language = 196 //
X_197 Language = 197 //
X_198 Language = 198 //
X_199 Language = 199 //
X_200 Language = 200 //
X_201 Language = 201 //
X_202 Language = 202 //
X_203 Language = 203 //
X_204 Language = 204 //
X_205 Language = 205 //
X_206 Language = 206 //
X_207 Language = 207 //
X_208 Language = 208 //
X_209 Language = 209 //
X_210 Language = 210 //
X_211 Language = 211 //
X_212 Language = 212 //
X_213 Language = 213 //
X_214 Language = 214 //
X_215 Language = 215 //
X_216 Language = 216 //
X_217 Language = 217 //
X_218 Language = 218 //
X_219 Language = 219 //
X_220 Language = 220 //
X_221 Language = 221 //
X_222 Language = 222 //
X_223 Language = 223 //
X_224 Language = 224 //
X_225 Language = 225 //
X_226 Language = 226 //
X_227 Language = 227 //
X_228 Language = 228 //
X_229 Language = 229 //
X_230 Language = 230 //
X_231 Language = 231 //
X_232 Language = 232 //
X_233 Language = 233 //
X_234 Language = 234 //
X_235 Language = 235 //
X_236 Language = 236 //
X_237 Language = 237 //
X_238 Language = 238 //
X_239 Language = 239 //
X_240 Language = 240 //
X_241 Language = 241 //
X_242 Language = 242 //
X_243 Language = 243 //
X_244 Language = 244 //
X_245 Language = 245 //
X_246 Language = 246 //
X_247 Language = 247 //
X_248 Language = 248 //
X_249 Language = 249 //
X_250 Language = 250 //
X_251 Language = 251 //
X_252 Language = 252 //
X_253 Language = 253 //
X_254 Language = 254 //
X_255 Language = 255 //
X_256 Language = 256 //
X_257 Language = 257 //
X_258 Language = 258 //
X_259 Language = 259 //
X_260 Language = 260 //
X_261 Language = 261 //
X_262 Language = 262 //
X_263 Language = 263 //
X_264 Language = 264 //
X_265 Language = 265 //
X_266 Language = 266 //
X_267 Language = 267 //
X_268 Language = 268 //
X_269 Language = 269 //
X_270 Language = 270 //
X_271 Language = 271 //
X_272 Language = 272 //
X_273 Language = 273 //
X_274 Language = 274 //
X_275 Language = 275 //
X_276 Language = 276 //
X_277 Language = 277 //
X_278 Language = 278 //
X_279 Language = 279 //
X_280 Language = 280 //
X_281 Language = 281 //
X_282 Language = 282 //
X_283 Language = 283 //
X_284 Language = 284 //
X_285 Language = 285 //
X_286 Language = 286 //
X_287 Language = 287 //
X_288 Language = 288 //
X_289 Language = 289 //
X_290 Language = 290 //
X_291 Language = 291 //
X_292 Language = 292 //
X_293 Language = 293 //
X_294 Language = 294 //
X_295 Language = 295 //
X_296 Language = 296 //
X_297 Language = 297 //
X_298 Language = 298 //
X_299 Language = 299 //
X_300 Language = 300 //
X_301 Language = 301 //
X_302 Language = 302 //
X_303 Language = 303 //
X_304 Language = 304 //
X_305 Language = 305 //
X_306 Language = 306 //
X_307 Language = 307 //
X_308 Language = 308 //
X_309 Language = 309 //
X_310 Language = 310 //
X_311 Language = 311 //
X_312 Language = 312 //
X_313 Language = 313 //
X_314 Language = 314 //
X_315 Language = 315 //
X_316 Language = 316 //
X_317 Language = 317 //
X_318 Language = 318 //
X_319 Language = 319 //
X_320 Language = 320 //
X_321 Language = 321 //
X_322 Language = 322 //
X_323 Language = 323 //
X_324 Language = 324 //
X_325 Language = 325 //
X_326 Language = 326 //
X_327 Language = 327 //
X_328 Language = 328 //
X_329 Language = 329 //
X_330 Language = 330 //
X_331 Language = 331 //
X_332 Language = 332 //
X_333 Language = 333 //
X_334 Language = 334 //
X_335 Language = 335 //
X_336 Language = 336 //
X_337 Language = 337 //
X_338 Language = 338 //
X_339 Language = 339 //
X_340 Language = 340 //
X_341 Language = 341 //
X_342 Language = 342 //
X_343 Language = 343 //
X_344 Language = 344 //
X_345 Language = 345 //
X_346 Language = 346 //
X_347 Language = 347 //
X_348 Language = 348 //
X_349 Language = 349 //
X_350 Language = 350 //
X_351 Language = 351 //
X_352 Language = 352 //
X_353 Language = 353 //
X_354 Language = 354 //
X_355 Language = 355 //
X_356 Language = 356 //
X_357 Language = 357 //
X_358 Language = 358 //
X_359 Language = 359 //
X_360 Language = 360 //
X_361 Language = 361 //
X_362 Language = 362 //
X_363 Language = 363 //
X_364 Language = 364 //
X_365 Language = 365 //
X_366 Language = 366 //
X_367 Language = 367 //
X_368 Language = 368 //
X_369 Language = 369 //
X_370 Language = 370 //
X_371 Language = 371 //
X_372 Language = 372 //
X_373 Language = 373 //
X_374 Language = 374 //
X_375 Language = 375 //
X_376 Language = 376 //
X_377 Language = 377 //
X_378 Language = 378 //
X_379 Language = 379 //
X_380 Language = 380 //
X_381 Language = 381 //
X_382 Language = 382 //
X_383 Language = 383 //
X_384 Language = 384 //
X_385 Language = 385 //
X_386 Language = 386 //
X_387 Language = 387 //
X_388 Language = 388 //
X_389 Language = 389 //
X_390 Language = 390 //
X_391 Language = 391 //
X_392 Language = 392 //
X_393 Language = 393 //
X_394 Language = 394 //
X_395 Language = 395 //
X_396 Language = 396 //
X_397 Language = 397 //
X_398 Language = 398 //
X_399 Language = 399 //
X_400 Language = 400 //
X_401 Language = 401 //
X_402 Language = 402 //
X_403 Language = 403 //
X_404 Language = 404 //
X_405 Language = 405 //
X_406 Language = 406 //
X_407 Language = 407 //
X_408 Language = 408 //
X_409 Language = 409 //
X_410 Language = 410 //
X_411 Language = 411 //
X_412 Language = 412 //
X_413 Language = 413 //
X_414 Language = 414 //
X_415 Language = 415 //
X_416 Language = 416 //
X_417 Language = 417 //
X_418 Language = 418 //
X_419 Language = 419 //
X_420 Language = 420 //
X_421 Language = 421 //
X_422 Language = 422 //
X_423 Language = 423 //
X_424 Language = 424 //
X_425 Language = 425 //
X_426 Language = 426 //
X_427 Language = 427 //
X_428 Language = 428 //
X_429 Language = 429 //
X_430 Language = 430 //
X_431 Language = 431 //
X_432 Language = 432 //
X_433 Language = 433 //
X_434 Language = 434 //
X_435 Language = 435 //
X_436 Language = 436 //
X_437 Language = 437 //
X_438 Language = 438 //
X_439 Language = 439 //
X_440 Language = 440 //
X_441 Language = 441 //
X_442 Language = 442 //
X_443 Language = 443 //
X_444 Language = 444 //
X_445 Language = 445 //
X_446 Language = 446 //
X_447 Language = 447 //
X_448 Language = 448 //
X_449 Language = 449 //
X_450 Language = 450 //
X_451 Language = 451 //
X_452 Language = 452 //
X_453 Language = 453 //
X_454 Language = 454 //
X_455 Language = 455 //
X_456 Language = 456 //
X_457 Language = 457 //
X_458 Language = 458 //
X_459 Language = 459 //
X_460 Language = 460 //
X_461 Language = 461 //
X_462 Language = 462 //
X_463 Language = 463 //
X_464 Language = 464 //
X_465 Language = 465 //
X_466 Language = 466 //
X_467 Language = 467 //
X_468 Language = 468 //
X_469 Language = 469 //
X_470 Language = 470 //
X_471 Language = 471 //
X_472 Language = 472 //
X_473 Language = 473 //
X_474 Language = 474 //
X_475 Language = 475 //
X_476 Language = 476 //
X_477 Language = 477 //
X_478 Language = 478 //
X_479 Language = 479 //
X_480 Language = 480 //
X_481 Language = 481 //
X_482 Language = 482 //
X_483 Language = 483 //
X_484 Language = 484 //
X_485 Language = 485 //
X_486 Language = 486 //
X_487 Language = 487 //
X_488 Language = 488 //
X_489 Language = 489 //
X_490 Language = 490 //
X_491 Language = 491 //
X_492 Language = 492 //
X_493 Language = 493 //
X_494 Language = 494 //
X_495 Language = 495 //
X_496 Language = 496 //
X_497 Language = 497 //
X_498 Language = 498 //
X_499 Language = 499 //
X_500 Language = 500 //
X_501 Language = 501 //
X_502 Language = 502 //
X_503 Language = 503 //
X_504 Language = 504 //
X_505 Language = 505 //
NDEBELE Language = 506 // nr
X_BORK_BORK_BORK Language = 507 // zzb
X_PIG_LATIN Language = 508 // zzp
X_HACKER Language = 509 // zzh
X_KLINGON Language = 510 // tlh
X_ELMER_FUDD Language = 511 // zze
X_Common Language = 512 // xx-Zyyy
X_Latin Language = 513 // xx-Latn
X_Greek Language = 514 // xx-Grek
X_Cyrillic Language = 515 // xx-Cyrl
X_Armenian Language = 516 // xx-Armn
X_Hebrew Language = 517 // xx-Hebr
X_Arabic Language = 518 // xx-Arab
X_Syriac Language = 519 // xx-Syrc
X_Thaana Language = 520 // xx-Thaa
X_Devanagari Language = 521 // xx-Deva
X_Bengali Language = 522 // xx-Beng
X_Gurmukhi Language = 523 // xx-Guru
X_Gujarati Language = 524 // xx-Gujr
X_Oriya Language = 525 // xx-Orya
X_Tamil Language = 526 // xx-Taml
X_Telugu Language = 527 // xx-Telu
X_Kannada Language = 528 // xx-Knda
X_Malayalam Language = 529 // xx-Mlym
X_Sinhala Language = 530 // xx-Sinh
X_Thai Language = 531 // xx-Thai
X_Lao Language = 532 // xx-Laoo
X_Tibetan Language = 533 // xx-Tibt
X_Myanmar Language = 534 // xx-Mymr
X_Georgian Language = 535 // xx-Geor
X_Hangul Language = 536 // xx-Hang
X_Ethiopic Language = 537 // xx-Ethi
X_Cherokee Language = 538 // xx-Cher
X_Canadian_Aboriginal Language = 539 // xx-Cans
X_Ogham Language = 540 // xx-Ogam
X_Runic Language = 541 // xx-Runr
X_Khmer Language = 542 // xx-Khmr
X_Mongolian Language = 543 // xx-Mong
X_Hiragana Language = 544 // xx-Hira
X_Katakana Language = 545 // xx-Kana
X_Bopomofo Language = 546 // xx-Bopo
X_Han Language = 547 // xx-Hani
X_Yi Language = 548 // xx-Yiii
X_Old_Italic Language = 549 // xx-Ital
X_Gothic Language = 550 // xx-Goth
X_Deseret Language = 551 // xx-Dsrt
X_Inherited Language = 552 // xx-Qaai
X_Tagalog Language = 553 // xx-Tglg
X_Hanunoo Language = 554 // xx-Hano
X_Buhid Language = 555 // xx-Buhd
X_Tagbanwa Language = 556 // xx-Tagb
X_Limbu Language = 557 // xx-Limb
X_Tai_Le Language = 558 // xx-Tale
X_Linear_B Language = 559 // xx-Linb
X_Ugaritic Language = 560 // xx-Ugar
X_Shavian Language = 561 // xx-Shaw
X_Osmanya Language = 562 // xx-Osma
X_Cypriot Language = 563 // xx-Cprt
X_Braille Language = 564 // xx-Brai
X_Buginese Language = 565 // xx-Bugi
X_Coptic Language = 566 // xx-Copt
X_New_Tai_Lue Language = 567 // xx-Talu
X_Glagolitic Language = 568 // xx-Glag
X_Tifinagh Language = 569 // xx-Tfng
X_Syloti_Nagri Language = 570 // xx-Sylo
X_Old_Persian Language = 571 // xx-Xpeo
X_Kharoshthi Language = 572 // xx-Khar
X_Balinese Language = 573 // xx-Bali
X_Cuneiform Language = 574 // xx-Xsux
X_Phoenician Language = 575 // xx-Phnx
X_Phags_Pa Language = 576 // xx-Phag
X_Nko Language = 577 // xx-Nkoo
X_Sundanese Language = 578 // xx-Sund
X_Lepcha Language = 579 // xx-Lepc
X_Ol_Chiki Language = 580 // xx-Olck
X_Vai Language = 581 // xx-Vaii
X_Saurashtra Language = 582 // xx-Saur
X_Kayah_Li Language = 583 // xx-Kali
X_Rejang Language = 584 // xx-Rjng
X_Lycian Language = 585 // xx-Lyci
X_Carian Language = 586 // xx-Cari
X_Lydian Language = 587 // xx-Lydi
X_Cham Language = 588 // xx-Cham
X_Tai_Tham Language = 589 // xx-Lana
X_Tai_Viet Language = 590 // xx-Tavt
X_Avestan Language = 591 // xx-Avst
X_Egyptian_Hieroglyphs Language = 592 // xx-Egyp
X_Samaritan Language = 593 // xx-Samr
X_Lisu Language = 594 // xx-Lisu
X_Bamum Language = 595 // xx-Bamu
X_Javanese Language = 596 // xx-Java
X_Meetei_Mayek Language = 597 // xx-Mtei
X_Imperial_Aramaic Language = 598 // xx-Armi
X_Old_South_Arabian Language = 599 // xx-Sarb
X_Inscriptional_Parthian Language = 600 // xx-Prti
X_Inscriptional_Pahlavi Language = 601 // xx-Phli
X_Old_Turkic Language = 602 // xx-Orkh
X_Kaithi Language = 603 // xx-Kthi
X_Batak Language = 604 // xx-Batk
X_Brahmi Language = 605 // xx-Brah
X_Mandaic Language = 606 // xx-Mand
X_Chakma Language = 607 // xx-Cakm
X_Meroitic_Cursive Language = 608 // xx-Merc
X_Meroitic_Hieroglyphs Language = 609 // xx-Mero
X_Miao Language = 610 // xx-Plrd
X_Sharada Language = 611 // xx-Shrd
X_Sora_Sompeng Language = 612 // xx-Sora
X_Takri Language = 613 // xx-Takr
NUM_LANGUAGES Language = 614
)
var codeToLanguage = make(map[string]Language)
func init() {
for i, code := range languageToCode {
if code != "" {
codeToLanguage[code] = Language(i)
}
}
}
var languageToCode = []string{
"en", // 0 ENGLISH
"da", // 1 DANISH
"nl", // 2 DUTCH
"fi", // 3 FINNISH
"fr", // 4 FRENCH
"de", // 5 GERMAN
"iw", // 6 HEBREW
"it", // 7 ITALIAN
"ja", // 8 Japanese
"ko", // 9 Korean
"no", // 10 NORWEGIAN
"pl", // 11 POLISH
"pt", // 12 PORTUGUESE
"ru", // 13 RUSSIAN
"es", // 14 SPANISH
"sv", // 15 SWEDISH
"zh", // 16 Chinese
"cs", // 17 CZECH
"el", // 18 GREEK
"is", // 19 ICELANDIC
"lv", // 20 LATVIAN
"lt", // 21 LITHUANIAN
"ro", // 22 ROMANIAN
"hu", // 23 HUNGARIAN
"et", // 24 ESTONIAN
"xxx", // 25 Ignore
"un", // 26 Unknown
"bg", // 27 BULGARIAN
"hr", // 28 CROATIAN
"sr", // 29 SERBIAN
"ga", // 30 IRISH
"gl", // 31 GALICIAN
"tl", // 32 TAGALOG
"tr", // 33 TURKISH
"uk", // 34 UKRAINIAN
"hi", // 35 HINDI
"mk", // 36 MACEDONIAN
"bn", // 37 BENGALI
"id", // 38 INDONESIAN
"la", // 39 LATIN
"ms", // 40 MALAY
"ml", // 41 MALAYALAM
"cy", // 42 WELSH
"ne", // 43 NEPALI
"te", // 44 TELUGU
"sq", // 45 ALBANIAN
"ta", // 46 TAMIL
"be", // 47 BELARUSIAN
"jw", // 48 JAVANESE
"oc", // 49 OCCITAN
"ur", // 50 URDU
"bh", // 51 BIHARI
"gu", // 52 GUJARATI
"th", // 53 THAI
"ar", // 54 ARABIC
"ca", // 55 CATALAN
"eo", // 56 ESPERANTO
"eu", // 57 BASQUE
"ia", // 58 INTERLINGUA
"kn", // 59 KANNADA
"pa", // 60 PUNJABI
"gd", // 61 SCOTS_GAELIC
"sw", // 62 SWAHILI
"sl", // 63 SLOVENIAN
"mr", // 64 MARATHI
"mt", // 65 MALTESE
"vi", // 66 VIETNAMESE
"fy", // 67 FRISIAN
"sk", // 68 SLOVAK
"zh-Hant", // 69 ChineseT
"fo", // 70 FAROESE
"su", // 71 SUNDANESE
"uz", // 72 UZBEK
"am", // 73 AMHARIC
"az", // 74 AZERBAIJANI
"ka", // 75 GEORGIAN
"ti", // 76 TIGRINYA
"fa", // 77 PERSIAN
"bs", // 78 BOSNIAN
"si", // 79 SINHALESE
"nn", // 80 NORWEGIAN_N
"", // 81 81
"", // 82 82
"xh", // 83 XHOSA
"zu", // 84 ZULU
"gn", // 85 GUARANI
"st", // 86 SESOTHO
"tk", // 87 TURKMEN
"ky", // 88 KYRGYZ
"br", // 89 BRETON
"tw", // 90 TWI
"yi", // 91 YIDDISH
"", // 92 92
"so", // 93 SOMALI
"ug", // 94 UIGHUR
"ku", // 95 KURDISH
"mn", // 96 MONGOLIAN
"hy", // 97 ARMENIAN
"lo", // 98 LAOTHIAN
"sd", // 99 SINDHI
"rm", // 100 RHAETO_ROMANCE
"af", // 101 AFRIKAANS
"lb", // 102 LUXEMBOURGISH
"my", // 103 BURMESE
"km", // 104 KHMER
"bo", // 105 TIBETAN
"dv", // 106 DHIVEHI
"chr", // 107 CHEROKEE
"syr", // 108 SYRIAC
"lif", // 109 LIMBU
"or", // 110 ORIYA
"as", // 111 ASSAMESE
"co", // 112 CORSICAN
"ie", // 113 INTERLINGUE
"kk", // 114 KAZAKH
"ln", // 115 LINGALA
"", // 116 116
"ps", // 117 PASHTO
"qu", // 118 QUECHUA
"sn", // 119 SHONA
"tg", // 120 TAJIK
"tt", // 121 TATAR
"to", // 122 TONGA
"yo", // 123 YORUBA
"", // 124 124
"", // 125 125
"", // 126 126
"", // 127 127
"mi", // 128 MAORI
"wo", // 129 WOLOF
"ab", // 130 ABKHAZIAN
"aa", // 131 AFAR
"ay", // 132 AYMARA
"ba", // 133 BASHKIR
"bi", // 134 BISLAMA
"dz", // 135 DZONGKHA
"fj", // 136 FIJIAN
"kl", // 137 GREENLANDIC
"ha", // 138 HAUSA
"ht", // 139 HAITIAN_CREOLE
"ik", // 140 INUPIAK
"iu", // 141 INUKTITUT
"ks", // 142 KASHMIRI
"rw", // 143 KINYARWANDA
"mg", // 144 MALAGASY
"na", // 145 NAURU
"om", // 146 OROMO
"rn", // 147 RUNDI
"sm", // 148 SAMOAN
"sg", // 149 SANGO
"sa", // 150 SANSKRIT
"ss", // 151 SISWANT
"ts", // 152 TSONGA
"tn", // 153 TSWANA
"vo", // 154 VOLAPUK
"za", // 155 ZHUANG
"kha", // 156 KHASI
"sco", // 157 SCOTS
"lg", // 158 GANDA
"gv", // 159 MANX
"sr-ME", // 160 MONTENEGRIN
"ak", // 161 AKAN
"ig", // 162 IGBO
"mfe", // 163 MAURITIAN_CREOLE
"haw", // 164 HAWAIIAN
"ceb", // 165 CEBUANO
"ee", // 166 EWE
"gaa", // 167 GA
"hmn", // 168 HMONG
"kri", // 169 KRIO
"loz", // 170 LOZI
"lua", // 171 LUBA_LULUA
"luo", // 172 LUO_KENYA_AND_TANZANIA
"new", // 173 NEWARI
"ny", // 174 NYANJA
"os", // 175 OSSETIAN
"pam", // 176 PAMPANGA
"nso", // 177 PEDI
"raj", // 178 RAJASTHANI
"crs", // 179 SESELWA
"tum", // 180 TUMBUKA
"ve", // 181 VENDA
"war", // 182 WARAY_PHILIPPINES
"", // 183 183
"", // 184 184
"", // 185 185
"", // 186 186
"", // 187 187
"", // 188 188
"", // 189 189
"", // 190 190
"", // 191 191
"", // 192 192
"", // 193 193
"", // 194 194
"", // 195 195
"", // 196 196
"", // 197 197
"", // 198 198
"", // 199 199
"", // 200 200
"", // 201 201
"", // 202 202
"", // 203 203
"", // 204 204
"", // 205 205
"", // 206 206
"", // 207 207
"", // 208 208
"", // 209 209
"", // 210 210
"", // 211 211
"", // 212 212
"", // 213 213
"", // 214 214
"", // 215 215
"", // 216 216
"", // 217 217
"", // 218 218
"", // 219 219
"", // 220 220
"", // 221 221
"", // 222 222
"", // 223 223
"", // 224 224
"", // 225 225
"", // 226 226
"", // 227 227
"", // 228 228
"", // 229 229
"", // 230 230
"", // 231 231
"", // 232 232
"", // 233 233
"", // 234 234
"", // 235 235
"", // 236 236
"", // 237 237
"", // 238 238
"", // 239 239
"", // 240 240
"", // 241 241
"", // 242 242
"", // 243 243
"", // 244 244
"", // 245 245
"", // 246 246
"", // 247 247
"", // 248 248
"", // 249 249
"", // 250 250
"", // 251 251
"", // 252 252
"", // 253 253
"", // 254 254
"", // 255 255
"", // 256 256
"", // 257 257
"", // 258 258
"", // 259 259
"", // 260 260
"", // 261 261
"", // 262 262
"", // 263 263
"", // 264 264
"", // 265 265
"", // 266 266
"", // 267 267
"", // 268 268
"", // 269 269
"", // 270 270
"", // 271 271
"", // 272 272
"", // 273 273
"", // 274 274
"", // 275 275
"", // 276 276
"", // 277 277
"", // 278 278
"", // 279 279
"", // 280 280
"", // 281 281
"", // 282 282
"", // 283 283
"", // 284 284
"", // 285 285
"", // 286 286
"", // 287 287
"", // 288 288
"", // 289 289
"", // 290 290
"", // 291 291
"", // 292 292
"", // 293 293
"", // 294 294
"", // 295 295
"", // 296 296
"", // 297 297
"", // 298 298
"", // 299 299
"", // 300 300
"", // 301 301
"", // 302 302
"", // 303 303
"", // 304 304
"", // 305 305
"", // 306 306
"", // 307 307
"", // 308 308
"", // 309 309
"", // 310 310
"", // 311 311
"", // 312 312
"", // 313 313
"", // 314 314
"", // 315 315
"", // 316 316