You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

types.go 33KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636
  1. package govalidator
  2. import (
  3. "reflect"
  4. "regexp"
  5. "sort"
  6. "sync"
  7. )
  8. // Validator is a wrapper for a validator function that returns bool and accepts string.
  9. type Validator func(str string) bool
  10. // CustomTypeValidator is a wrapper for validator functions that returns bool and accepts any type.
  11. // The second parameter should be the context (in the case of validating a struct: the whole object being validated).
  12. type CustomTypeValidator func(i interface{}, o interface{}) bool
  13. // ParamValidator is a wrapper for validator functions that accepts additional parameters.
  14. type ParamValidator func(str string, params ...string) bool
  15. type tagOptionsMap map[string]tagOption
  16. func (t tagOptionsMap) orderedKeys() []string {
  17. var keys []string
  18. for k := range t {
  19. keys = append(keys, k)
  20. }
  21. sort.Slice(keys, func(a, b int) bool {
  22. return t[keys[a]].order < t[keys[b]].order
  23. })
  24. return keys
  25. }
  26. type tagOption struct {
  27. name string
  28. customErrorMessage string
  29. order int
  30. }
  31. // UnsupportedTypeError is a wrapper for reflect.Type
  32. type UnsupportedTypeError struct {
  33. Type reflect.Type
  34. }
  35. // stringValues is a slice of reflect.Value holding *reflect.StringValue.
  36. // It implements the methods to sort by string.
  37. type stringValues []reflect.Value
  38. // ParamTagMap is a map of functions accept variants parameters
  39. var ParamTagMap = map[string]ParamValidator{
  40. "length": ByteLength,
  41. "range": Range,
  42. "runelength": RuneLength,
  43. "stringlength": StringLength,
  44. "matches": StringMatches,
  45. "in": isInRaw,
  46. "rsapub": IsRsaPub,
  47. }
  48. // ParamTagRegexMap maps param tags to their respective regexes.
  49. var ParamTagRegexMap = map[string]*regexp.Regexp{
  50. "range": regexp.MustCompile("^range\\((\\d+)\\|(\\d+)\\)$"),
  51. "length": regexp.MustCompile("^length\\((\\d+)\\|(\\d+)\\)$"),
  52. "runelength": regexp.MustCompile("^runelength\\((\\d+)\\|(\\d+)\\)$"),
  53. "stringlength": regexp.MustCompile("^stringlength\\((\\d+)\\|(\\d+)\\)$"),
  54. "in": regexp.MustCompile(`^in\((.*)\)`),
  55. "matches": regexp.MustCompile(`^matches\((.+)\)$`),
  56. "rsapub": regexp.MustCompile("^rsapub\\((\\d+)\\)$"),
  57. }
  58. type customTypeTagMap struct {
  59. validators map[string]CustomTypeValidator
  60. sync.RWMutex
  61. }
  62. func (tm *customTypeTagMap) Get(name string) (CustomTypeValidator, bool) {
  63. tm.RLock()
  64. defer tm.RUnlock()
  65. v, ok := tm.validators[name]
  66. return v, ok
  67. }
  68. func (tm *customTypeTagMap) Set(name string, ctv CustomTypeValidator) {
  69. tm.Lock()
  70. defer tm.Unlock()
  71. tm.validators[name] = ctv
  72. }
  73. // CustomTypeTagMap is a map of functions that can be used as tags for ValidateStruct function.
  74. // Use this to validate compound or custom types that need to be handled as a whole, e.g.
  75. // `type UUID [16]byte` (this would be handled as an array of bytes).
  76. var CustomTypeTagMap = &customTypeTagMap{validators: make(map[string]CustomTypeValidator)}
  77. // TagMap is a map of functions, that can be used as tags for ValidateStruct function.
  78. var TagMap = map[string]Validator{
  79. "email": IsEmail,
  80. "url": IsURL,
  81. "dialstring": IsDialString,
  82. "requrl": IsRequestURL,
  83. "requri": IsRequestURI,
  84. "alpha": IsAlpha,
  85. "utfletter": IsUTFLetter,
  86. "alphanum": IsAlphanumeric,
  87. "utfletternum": IsUTFLetterNumeric,
  88. "numeric": IsNumeric,
  89. "utfnumeric": IsUTFNumeric,
  90. "utfdigit": IsUTFDigit,
  91. "hexadecimal": IsHexadecimal,
  92. "hexcolor": IsHexcolor,
  93. "rgbcolor": IsRGBcolor,
  94. "lowercase": IsLowerCase,
  95. "uppercase": IsUpperCase,
  96. "int": IsInt,
  97. "float": IsFloat,
  98. "null": IsNull,
  99. "uuid": IsUUID,
  100. "uuidv3": IsUUIDv3,
  101. "uuidv4": IsUUIDv4,
  102. "uuidv5": IsUUIDv5,
  103. "creditcard": IsCreditCard,
  104. "isbn10": IsISBN10,
  105. "isbn13": IsISBN13,
  106. "json": IsJSON,
  107. "multibyte": IsMultibyte,
  108. "ascii": IsASCII,
  109. "printableascii": IsPrintableASCII,
  110. "fullwidth": IsFullWidth,
  111. "halfwidth": IsHalfWidth,
  112. "variablewidth": IsVariableWidth,
  113. "base64": IsBase64,
  114. "datauri": IsDataURI,
  115. "ip": IsIP,
  116. "port": IsPort,
  117. "ipv4": IsIPv4,
  118. "ipv6": IsIPv6,
  119. "dns": IsDNSName,
  120. "host": IsHost,
  121. "mac": IsMAC,
  122. "latitude": IsLatitude,
  123. "longitude": IsLongitude,
  124. "ssn": IsSSN,
  125. "semver": IsSemver,
  126. "rfc3339": IsRFC3339,
  127. "rfc3339WithoutZone": IsRFC3339WithoutZone,
  128. "ISO3166Alpha2": IsISO3166Alpha2,
  129. "ISO3166Alpha3": IsISO3166Alpha3,
  130. "ISO4217": IsISO4217,
  131. }
  132. // ISO3166Entry stores country codes
  133. type ISO3166Entry struct {
  134. EnglishShortName string
  135. FrenchShortName string
  136. Alpha2Code string
  137. Alpha3Code string
  138. Numeric string
  139. }
  140. //ISO3166List based on https://www.iso.org/obp/ui/#search/code/ Code Type "Officially Assigned Codes"
  141. var ISO3166List = []ISO3166Entry{
  142. {"Afghanistan", "Afghanistan (l')", "AF", "AFG", "004"},
  143. {"Albania", "Albanie (l')", "AL", "ALB", "008"},
  144. {"Antarctica", "Antarctique (l')", "AQ", "ATA", "010"},
  145. {"Algeria", "Algérie (l')", "DZ", "DZA", "012"},
  146. {"American Samoa", "Samoa américaines (les)", "AS", "ASM", "016"},
  147. {"Andorra", "Andorre (l')", "AD", "AND", "020"},
  148. {"Angola", "Angola (l')", "AO", "AGO", "024"},
  149. {"Antigua and Barbuda", "Antigua-et-Barbuda", "AG", "ATG", "028"},
  150. {"Azerbaijan", "Azerbaïdjan (l')", "AZ", "AZE", "031"},
  151. {"Argentina", "Argentine (l')", "AR", "ARG", "032"},
  152. {"Australia", "Australie (l')", "AU", "AUS", "036"},
  153. {"Austria", "Autriche (l')", "AT", "AUT", "040"},
  154. {"Bahamas (the)", "Bahamas (les)", "BS", "BHS", "044"},
  155. {"Bahrain", "Bahreïn", "BH", "BHR", "048"},
  156. {"Bangladesh", "Bangladesh (le)", "BD", "BGD", "050"},
  157. {"Armenia", "Arménie (l')", "AM", "ARM", "051"},
  158. {"Barbados", "Barbade (la)", "BB", "BRB", "052"},
  159. {"Belgium", "Belgique (la)", "BE", "BEL", "056"},
  160. {"Bermuda", "Bermudes (les)", "BM", "BMU", "060"},
  161. {"Bhutan", "Bhoutan (le)", "BT", "BTN", "064"},
  162. {"Bolivia (Plurinational State of)", "Bolivie (État plurinational de)", "BO", "BOL", "068"},
  163. {"Bosnia and Herzegovina", "Bosnie-Herzégovine (la)", "BA", "BIH", "070"},
  164. {"Botswana", "Botswana (le)", "BW", "BWA", "072"},
  165. {"Bouvet Island", "Bouvet (l'Île)", "BV", "BVT", "074"},
  166. {"Brazil", "Brésil (le)", "BR", "BRA", "076"},
  167. {"Belize", "Belize (le)", "BZ", "BLZ", "084"},
  168. {"British Indian Ocean Territory (the)", "Indien (le Territoire britannique de l'océan)", "IO", "IOT", "086"},
  169. {"Solomon Islands", "Salomon (Îles)", "SB", "SLB", "090"},
  170. {"Virgin Islands (British)", "Vierges britanniques (les Îles)", "VG", "VGB", "092"},
  171. {"Brunei Darussalam", "Brunéi Darussalam (le)", "BN", "BRN", "096"},
  172. {"Bulgaria", "Bulgarie (la)", "BG", "BGR", "100"},
  173. {"Myanmar", "Myanmar (le)", "MM", "MMR", "104"},
  174. {"Burundi", "Burundi (le)", "BI", "BDI", "108"},
  175. {"Belarus", "Bélarus (le)", "BY", "BLR", "112"},
  176. {"Cambodia", "Cambodge (le)", "KH", "KHM", "116"},
  177. {"Cameroon", "Cameroun (le)", "CM", "CMR", "120"},
  178. {"Canada", "Canada (le)", "CA", "CAN", "124"},
  179. {"Cabo Verde", "Cabo Verde", "CV", "CPV", "132"},
  180. {"Cayman Islands (the)", "Caïmans (les Îles)", "KY", "CYM", "136"},
  181. {"Central African Republic (the)", "République centrafricaine (la)", "CF", "CAF", "140"},
  182. {"Sri Lanka", "Sri Lanka", "LK", "LKA", "144"},
  183. {"Chad", "Tchad (le)", "TD", "TCD", "148"},
  184. {"Chile", "Chili (le)", "CL", "CHL", "152"},
  185. {"China", "Chine (la)", "CN", "CHN", "156"},
  186. {"Taiwan (Province of China)", "Taïwan (Province de Chine)", "TW", "TWN", "158"},
  187. {"Christmas Island", "Christmas (l'Île)", "CX", "CXR", "162"},
  188. {"Cocos (Keeling) Islands (the)", "Cocos (les Îles)/ Keeling (les Îles)", "CC", "CCK", "166"},
  189. {"Colombia", "Colombie (la)", "CO", "COL", "170"},
  190. {"Comoros (the)", "Comores (les)", "KM", "COM", "174"},
  191. {"Mayotte", "Mayotte", "YT", "MYT", "175"},
  192. {"Congo (the)", "Congo (le)", "CG", "COG", "178"},
  193. {"Congo (the Democratic Republic of the)", "Congo (la République démocratique du)", "CD", "COD", "180"},
  194. {"Cook Islands (the)", "Cook (les Îles)", "CK", "COK", "184"},
  195. {"Costa Rica", "Costa Rica (le)", "CR", "CRI", "188"},
  196. {"Croatia", "Croatie (la)", "HR", "HRV", "191"},
  197. {"Cuba", "Cuba", "CU", "CUB", "192"},
  198. {"Cyprus", "Chypre", "CY", "CYP", "196"},
  199. {"Czech Republic (the)", "tchèque (la République)", "CZ", "CZE", "203"},
  200. {"Benin", "Bénin (le)", "BJ", "BEN", "204"},
  201. {"Denmark", "Danemark (le)", "DK", "DNK", "208"},
  202. {"Dominica", "Dominique (la)", "DM", "DMA", "212"},
  203. {"Dominican Republic (the)", "dominicaine (la République)", "DO", "DOM", "214"},
  204. {"Ecuador", "Équateur (l')", "EC", "ECU", "218"},
  205. {"El Salvador", "El Salvador", "SV", "SLV", "222"},
  206. {"Equatorial Guinea", "Guinée équatoriale (la)", "GQ", "GNQ", "226"},
  207. {"Ethiopia", "Éthiopie (l')", "ET", "ETH", "231"},
  208. {"Eritrea", "Érythrée (l')", "ER", "ERI", "232"},
  209. {"Estonia", "Estonie (l')", "EE", "EST", "233"},
  210. {"Faroe Islands (the)", "Féroé (les Îles)", "FO", "FRO", "234"},
  211. {"Falkland Islands (the) [Malvinas]", "Falkland (les Îles)/Malouines (les Îles)", "FK", "FLK", "238"},
  212. {"South Georgia and the South Sandwich Islands", "Géorgie du Sud-et-les Îles Sandwich du Sud (la)", "GS", "SGS", "239"},
  213. {"Fiji", "Fidji (les)", "FJ", "FJI", "242"},
  214. {"Finland", "Finlande (la)", "FI", "FIN", "246"},
  215. {"Åland Islands", "Åland(les Îles)", "AX", "ALA", "248"},
  216. {"France", "France (la)", "FR", "FRA", "250"},
  217. {"French Guiana", "Guyane française (la )", "GF", "GUF", "254"},
  218. {"French Polynesia", "Polynésie française (la)", "PF", "PYF", "258"},
  219. {"French Southern Territories (the)", "Terres australes françaises (les)", "TF", "ATF", "260"},
  220. {"Djibouti", "Djibouti", "DJ", "DJI", "262"},
  221. {"Gabon", "Gabon (le)", "GA", "GAB", "266"},
  222. {"Georgia", "Géorgie (la)", "GE", "GEO", "268"},
  223. {"Gambia (the)", "Gambie (la)", "GM", "GMB", "270"},
  224. {"Palestine, State of", "Palestine, État de", "PS", "PSE", "275"},
  225. {"Germany", "Allemagne (l')", "DE", "DEU", "276"},
  226. {"Ghana", "Ghana (le)", "GH", "GHA", "288"},
  227. {"Gibraltar", "Gibraltar", "GI", "GIB", "292"},
  228. {"Kiribati", "Kiribati", "KI", "KIR", "296"},
  229. {"Greece", "Grèce (la)", "GR", "GRC", "300"},
  230. {"Greenland", "Groenland (le)", "GL", "GRL", "304"},
  231. {"Grenada", "Grenade (la)", "GD", "GRD", "308"},
  232. {"Guadeloupe", "Guadeloupe (la)", "GP", "GLP", "312"},
  233. {"Guam", "Guam", "GU", "GUM", "316"},
  234. {"Guatemala", "Guatemala (le)", "GT", "GTM", "320"},
  235. {"Guinea", "Guinée (la)", "GN", "GIN", "324"},
  236. {"Guyana", "Guyana (le)", "GY", "GUY", "328"},
  237. {"Haiti", "Haïti", "HT", "HTI", "332"},
  238. {"Heard Island and McDonald Islands", "Heard-et-Îles MacDonald (l'Île)", "HM", "HMD", "334"},
  239. {"Holy See (the)", "Saint-Siège (le)", "VA", "VAT", "336"},
  240. {"Honduras", "Honduras (le)", "HN", "HND", "340"},
  241. {"Hong Kong", "Hong Kong", "HK", "HKG", "344"},
  242. {"Hungary", "Hongrie (la)", "HU", "HUN", "348"},
  243. {"Iceland", "Islande (l')", "IS", "ISL", "352"},
  244. {"India", "Inde (l')", "IN", "IND", "356"},
  245. {"Indonesia", "Indonésie (l')", "ID", "IDN", "360"},
  246. {"Iran (Islamic Republic of)", "Iran (République Islamique d')", "IR", "IRN", "364"},
  247. {"Iraq", "Iraq (l')", "IQ", "IRQ", "368"},
  248. {"Ireland", "Irlande (l')", "IE", "IRL", "372"},
  249. {"Israel", "Israël", "IL", "ISR", "376"},
  250. {"Italy", "Italie (l')", "IT", "ITA", "380"},
  251. {"Côte d'Ivoire", "Côte d'Ivoire (la)", "CI", "CIV", "384"},
  252. {"Jamaica", "Jamaïque (la)", "JM", "JAM", "388"},
  253. {"Japan", "Japon (le)", "JP", "JPN", "392"},
  254. {"Kazakhstan", "Kazakhstan (le)", "KZ", "KAZ", "398"},
  255. {"Jordan", "Jordanie (la)", "JO", "JOR", "400"},
  256. {"Kenya", "Kenya (le)", "KE", "KEN", "404"},
  257. {"Korea (the Democratic People's Republic of)", "Corée (la République populaire démocratique de)", "KP", "PRK", "408"},
  258. {"Korea (the Republic of)", "Corée (la République de)", "KR", "KOR", "410"},
  259. {"Kuwait", "Koweït (le)", "KW", "KWT", "414"},
  260. {"Kyrgyzstan", "Kirghizistan (le)", "KG", "KGZ", "417"},
  261. {"Lao People's Democratic Republic (the)", "Lao, République démocratique populaire", "LA", "LAO", "418"},
  262. {"Lebanon", "Liban (le)", "LB", "LBN", "422"},
  263. {"Lesotho", "Lesotho (le)", "LS", "LSO", "426"},
  264. {"Latvia", "Lettonie (la)", "LV", "LVA", "428"},
  265. {"Liberia", "Libéria (le)", "LR", "LBR", "430"},
  266. {"Libya", "Libye (la)", "LY", "LBY", "434"},
  267. {"Liechtenstein", "Liechtenstein (le)", "LI", "LIE", "438"},
  268. {"Lithuania", "Lituanie (la)", "LT", "LTU", "440"},
  269. {"Luxembourg", "Luxembourg (le)", "LU", "LUX", "442"},
  270. {"Macao", "Macao", "MO", "MAC", "446"},
  271. {"Madagascar", "Madagascar", "MG", "MDG", "450"},
  272. {"Malawi", "Malawi (le)", "MW", "MWI", "454"},
  273. {"Malaysia", "Malaisie (la)", "MY", "MYS", "458"},
  274. {"Maldives", "Maldives (les)", "MV", "MDV", "462"},
  275. {"Mali", "Mali (le)", "ML", "MLI", "466"},
  276. {"Malta", "Malte", "MT", "MLT", "470"},
  277. {"Martinique", "Martinique (la)", "MQ", "MTQ", "474"},
  278. {"Mauritania", "Mauritanie (la)", "MR", "MRT", "478"},
  279. {"Mauritius", "Maurice", "MU", "MUS", "480"},
  280. {"Mexico", "Mexique (le)", "MX", "MEX", "484"},
  281. {"Monaco", "Monaco", "MC", "MCO", "492"},
  282. {"Mongolia", "Mongolie (la)", "MN", "MNG", "496"},
  283. {"Moldova (the Republic of)", "Moldova , République de", "MD", "MDA", "498"},
  284. {"Montenegro", "Monténégro (le)", "ME", "MNE", "499"},
  285. {"Montserrat", "Montserrat", "MS", "MSR", "500"},
  286. {"Morocco", "Maroc (le)", "MA", "MAR", "504"},
  287. {"Mozambique", "Mozambique (le)", "MZ", "MOZ", "508"},
  288. {"Oman", "Oman", "OM", "OMN", "512"},
  289. {"Namibia", "Namibie (la)", "NA", "NAM", "516"},
  290. {"Nauru", "Nauru", "NR", "NRU", "520"},
  291. {"Nepal", "Népal (le)", "NP", "NPL", "524"},
  292. {"Netherlands (the)", "Pays-Bas (les)", "NL", "NLD", "528"},
  293. {"Curaçao", "Curaçao", "CW", "CUW", "531"},
  294. {"Aruba", "Aruba", "AW", "ABW", "533"},
  295. {"Sint Maarten (Dutch part)", "Saint-Martin (partie néerlandaise)", "SX", "SXM", "534"},
  296. {"Bonaire, Sint Eustatius and Saba", "Bonaire, Saint-Eustache et Saba", "BQ", "BES", "535"},
  297. {"New Caledonia", "Nouvelle-Calédonie (la)", "NC", "NCL", "540"},
  298. {"Vanuatu", "Vanuatu (le)", "VU", "VUT", "548"},
  299. {"New Zealand", "Nouvelle-Zélande (la)", "NZ", "NZL", "554"},
  300. {"Nicaragua", "Nicaragua (le)", "NI", "NIC", "558"},
  301. {"Niger (the)", "Niger (le)", "NE", "NER", "562"},
  302. {"Nigeria", "Nigéria (le)", "NG", "NGA", "566"},
  303. {"Niue", "Niue", "NU", "NIU", "570"},
  304. {"Norfolk Island", "Norfolk (l'Île)", "NF", "NFK", "574"},
  305. {"Norway", "Norvège (la)", "NO", "NOR", "578"},
  306. {"Northern Mariana Islands (the)", "Mariannes du Nord (les Îles)", "MP", "MNP", "580"},
  307. {"United States Minor Outlying Islands (the)", "Îles mineures éloignées des États-Unis (les)", "UM", "UMI", "581"},
  308. {"Micronesia (Federated States of)", "Micronésie (États fédérés de)", "FM", "FSM", "583"},
  309. {"Marshall Islands (the)", "Marshall (Îles)", "MH", "MHL", "584"},
  310. {"Palau", "Palaos (les)", "PW", "PLW", "585"},
  311. {"Pakistan", "Pakistan (le)", "PK", "PAK", "586"},
  312. {"Panama", "Panama (le)", "PA", "PAN", "591"},
  313. {"Papua New Guinea", "Papouasie-Nouvelle-Guinée (la)", "PG", "PNG", "598"},
  314. {"Paraguay", "Paraguay (le)", "PY", "PRY", "600"},
  315. {"Peru", "Pérou (le)", "PE", "PER", "604"},
  316. {"Philippines (the)", "Philippines (les)", "PH", "PHL", "608"},
  317. {"Pitcairn", "Pitcairn", "PN", "PCN", "612"},
  318. {"Poland", "Pologne (la)", "PL", "POL", "616"},
  319. {"Portugal", "Portugal (le)", "PT", "PRT", "620"},
  320. {"Guinea-Bissau", "Guinée-Bissau (la)", "GW", "GNB", "624"},
  321. {"Timor-Leste", "Timor-Leste (le)", "TL", "TLS", "626"},
  322. {"Puerto Rico", "Porto Rico", "PR", "PRI", "630"},
  323. {"Qatar", "Qatar (le)", "QA", "QAT", "634"},
  324. {"Réunion", "Réunion (La)", "RE", "REU", "638"},
  325. {"Romania", "Roumanie (la)", "RO", "ROU", "642"},
  326. {"Russian Federation (the)", "Russie (la Fédération de)", "RU", "RUS", "643"},
  327. {"Rwanda", "Rwanda (le)", "RW", "RWA", "646"},
  328. {"Saint Barthélemy", "Saint-Barthélemy", "BL", "BLM", "652"},
  329. {"Saint Helena, Ascension and Tristan da Cunha", "Sainte-Hélène, Ascension et Tristan da Cunha", "SH", "SHN", "654"},
  330. {"Saint Kitts and Nevis", "Saint-Kitts-et-Nevis", "KN", "KNA", "659"},
  331. {"Anguilla", "Anguilla", "AI", "AIA", "660"},
  332. {"Saint Lucia", "Sainte-Lucie", "LC", "LCA", "662"},
  333. {"Saint Martin (French part)", "Saint-Martin (partie française)", "MF", "MAF", "663"},
  334. {"Saint Pierre and Miquelon", "Saint-Pierre-et-Miquelon", "PM", "SPM", "666"},
  335. {"Saint Vincent and the Grenadines", "Saint-Vincent-et-les Grenadines", "VC", "VCT", "670"},
  336. {"San Marino", "Saint-Marin", "SM", "SMR", "674"},
  337. {"Sao Tome and Principe", "Sao Tomé-et-Principe", "ST", "STP", "678"},
  338. {"Saudi Arabia", "Arabie saoudite (l')", "SA", "SAU", "682"},
  339. {"Senegal", "Sénégal (le)", "SN", "SEN", "686"},
  340. {"Serbia", "Serbie (la)", "RS", "SRB", "688"},
  341. {"Seychelles", "Seychelles (les)", "SC", "SYC", "690"},
  342. {"Sierra Leone", "Sierra Leone (la)", "SL", "SLE", "694"},
  343. {"Singapore", "Singapour", "SG", "SGP", "702"},
  344. {"Slovakia", "Slovaquie (la)", "SK", "SVK", "703"},
  345. {"Viet Nam", "Viet Nam (le)", "VN", "VNM", "704"},
  346. {"Slovenia", "Slovénie (la)", "SI", "SVN", "705"},
  347. {"Somalia", "Somalie (la)", "SO", "SOM", "706"},
  348. {"South Africa", "Afrique du Sud (l')", "ZA", "ZAF", "710"},
  349. {"Zimbabwe", "Zimbabwe (le)", "ZW", "ZWE", "716"},
  350. {"Spain", "Espagne (l')", "ES", "ESP", "724"},
  351. {"South Sudan", "Soudan du Sud (le)", "SS", "SSD", "728"},
  352. {"Sudan (the)", "Soudan (le)", "SD", "SDN", "729"},
  353. {"Western Sahara*", "Sahara occidental (le)*", "EH", "ESH", "732"},
  354. {"Suriname", "Suriname (le)", "SR", "SUR", "740"},
  355. {"Svalbard and Jan Mayen", "Svalbard et l'Île Jan Mayen (le)", "SJ", "SJM", "744"},
  356. {"Swaziland", "Swaziland (le)", "SZ", "SWZ", "748"},
  357. {"Sweden", "Suède (la)", "SE", "SWE", "752"},
  358. {"Switzerland", "Suisse (la)", "CH", "CHE", "756"},
  359. {"Syrian Arab Republic", "République arabe syrienne (la)", "SY", "SYR", "760"},
  360. {"Tajikistan", "Tadjikistan (le)", "TJ", "TJK", "762"},
  361. {"Thailand", "Thaïlande (la)", "TH", "THA", "764"},
  362. {"Togo", "Togo (le)", "TG", "TGO", "768"},
  363. {"Tokelau", "Tokelau (les)", "TK", "TKL", "772"},
  364. {"Tonga", "Tonga (les)", "TO", "TON", "776"},
  365. {"Trinidad and Tobago", "Trinité-et-Tobago (la)", "TT", "TTO", "780"},
  366. {"United Arab Emirates (the)", "Émirats arabes unis (les)", "AE", "ARE", "784"},
  367. {"Tunisia", "Tunisie (la)", "TN", "TUN", "788"},
  368. {"Turkey", "Turquie (la)", "TR", "TUR", "792"},
  369. {"Turkmenistan", "Turkménistan (le)", "TM", "TKM", "795"},
  370. {"Turks and Caicos Islands (the)", "Turks-et-Caïcos (les Îles)", "TC", "TCA", "796"},
  371. {"Tuvalu", "Tuvalu (les)", "TV", "TUV", "798"},
  372. {"Uganda", "Ouganda (l')", "UG", "UGA", "800"},
  373. {"Ukraine", "Ukraine (l')", "UA", "UKR", "804"},
  374. {"Macedonia (the former Yugoslav Republic of)", "Macédoine (l'ex‑République yougoslave de)", "MK", "MKD", "807"},
  375. {"Egypt", "Égypte (l')", "EG", "EGY", "818"},
  376. {"United Kingdom of Great Britain and Northern Ireland (the)", "Royaume-Uni de Grande-Bretagne et d'Irlande du Nord (le)", "GB", "GBR", "826"},
  377. {"Guernsey", "Guernesey", "GG", "GGY", "831"},
  378. {"Jersey", "Jersey", "JE", "JEY", "832"},
  379. {"Isle of Man", "Île de Man", "IM", "IMN", "833"},
  380. {"Tanzania, United Republic of", "Tanzanie, République-Unie de", "TZ", "TZA", "834"},
  381. {"United States of America (the)", "États-Unis d'Amérique (les)", "US", "USA", "840"},
  382. {"Virgin Islands (U.S.)", "Vierges des États-Unis (les Îles)", "VI", "VIR", "850"},
  383. {"Burkina Faso", "Burkina Faso (le)", "BF", "BFA", "854"},
  384. {"Uruguay", "Uruguay (l')", "UY", "URY", "858"},
  385. {"Uzbekistan", "Ouzbékistan (l')", "UZ", "UZB", "860"},
  386. {"Venezuela (Bolivarian Republic of)", "Venezuela (République bolivarienne du)", "VE", "VEN", "862"},
  387. {"Wallis and Futuna", "Wallis-et-Futuna", "WF", "WLF", "876"},
  388. {"Samoa", "Samoa (le)", "WS", "WSM", "882"},
  389. {"Yemen", "Yémen (le)", "YE", "YEM", "887"},
  390. {"Zambia", "Zambie (la)", "ZM", "ZMB", "894"},
  391. }
  392. // ISO4217List is the list of ISO currency codes
  393. var ISO4217List = []string{
  394. "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN",
  395. "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD",
  396. "CAD", "CDF", "CHE", "CHF", "CHW", "CLF", "CLP", "CNY", "COP", "COU", "CRC", "CUC", "CUP", "CVE", "CZK",
  397. "DJF", "DKK", "DOP", "DZD",
  398. "EGP", "ERN", "ETB", "EUR",
  399. "FJD", "FKP",
  400. "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD",
  401. "HKD", "HNL", "HRK", "HTG", "HUF",
  402. "IDR", "ILS", "INR", "IQD", "IRR", "ISK",
  403. "JMD", "JOD", "JPY",
  404. "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT",
  405. "LAK", "LBP", "LKR", "LRD", "LSL", "LYD",
  406. "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRO", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN",
  407. "NAD", "NGN", "NIO", "NOK", "NPR", "NZD",
  408. "OMR",
  409. "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG",
  410. "QAR",
  411. "RON", "RSD", "RUB", "RWF",
  412. "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SRD", "SSP", "STD", "SVC", "SYP", "SZL",
  413. "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS",
  414. "UAH", "UGX", "USD", "USN", "UYI", "UYU", "UZS",
  415. "VEF", "VND", "VUV",
  416. "WST",
  417. "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "XSU", "XTS", "XUA", "XXX",
  418. "YER",
  419. "ZAR", "ZMW", "ZWL",
  420. }
  421. // ISO693Entry stores ISO language codes
  422. type ISO693Entry struct {
  423. Alpha3bCode string
  424. Alpha2Code string
  425. English string
  426. }
  427. //ISO693List based on http://data.okfn.org/data/core/language-codes/r/language-codes-3b2.json
  428. var ISO693List = []ISO693Entry{
  429. {Alpha3bCode: "aar", Alpha2Code: "aa", English: "Afar"},
  430. {Alpha3bCode: "abk", Alpha2Code: "ab", English: "Abkhazian"},
  431. {Alpha3bCode: "afr", Alpha2Code: "af", English: "Afrikaans"},
  432. {Alpha3bCode: "aka", Alpha2Code: "ak", English: "Akan"},
  433. {Alpha3bCode: "alb", Alpha2Code: "sq", English: "Albanian"},
  434. {Alpha3bCode: "amh", Alpha2Code: "am", English: "Amharic"},
  435. {Alpha3bCode: "ara", Alpha2Code: "ar", English: "Arabic"},
  436. {Alpha3bCode: "arg", Alpha2Code: "an", English: "Aragonese"},
  437. {Alpha3bCode: "arm", Alpha2Code: "hy", English: "Armenian"},
  438. {Alpha3bCode: "asm", Alpha2Code: "as", English: "Assamese"},
  439. {Alpha3bCode: "ava", Alpha2Code: "av", English: "Avaric"},
  440. {Alpha3bCode: "ave", Alpha2Code: "ae", English: "Avestan"},
  441. {Alpha3bCode: "aym", Alpha2Code: "ay", English: "Aymara"},
  442. {Alpha3bCode: "aze", Alpha2Code: "az", English: "Azerbaijani"},
  443. {Alpha3bCode: "bak", Alpha2Code: "ba", English: "Bashkir"},
  444. {Alpha3bCode: "bam", Alpha2Code: "bm", English: "Bambara"},
  445. {Alpha3bCode: "baq", Alpha2Code: "eu", English: "Basque"},
  446. {Alpha3bCode: "bel", Alpha2Code: "be", English: "Belarusian"},
  447. {Alpha3bCode: "ben", Alpha2Code: "bn", English: "Bengali"},
  448. {Alpha3bCode: "bih", Alpha2Code: "bh", English: "Bihari languages"},
  449. {Alpha3bCode: "bis", Alpha2Code: "bi", English: "Bislama"},
  450. {Alpha3bCode: "bos", Alpha2Code: "bs", English: "Bosnian"},
  451. {Alpha3bCode: "bre", Alpha2Code: "br", English: "Breton"},
  452. {Alpha3bCode: "bul", Alpha2Code: "bg", English: "Bulgarian"},
  453. {Alpha3bCode: "bur", Alpha2Code: "my", English: "Burmese"},
  454. {Alpha3bCode: "cat", Alpha2Code: "ca", English: "Catalan; Valencian"},
  455. {Alpha3bCode: "cha", Alpha2Code: "ch", English: "Chamorro"},
  456. {Alpha3bCode: "che", Alpha2Code: "ce", English: "Chechen"},
  457. {Alpha3bCode: "chi", Alpha2Code: "zh", English: "Chinese"},
  458. {Alpha3bCode: "chu", Alpha2Code: "cu", English: "Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic"},
  459. {Alpha3bCode: "chv", Alpha2Code: "cv", English: "Chuvash"},
  460. {Alpha3bCode: "cor", Alpha2Code: "kw", English: "Cornish"},
  461. {Alpha3bCode: "cos", Alpha2Code: "co", English: "Corsican"},
  462. {Alpha3bCode: "cre", Alpha2Code: "cr", English: "Cree"},
  463. {Alpha3bCode: "cze", Alpha2Code: "cs", English: "Czech"},
  464. {Alpha3bCode: "dan", Alpha2Code: "da", English: "Danish"},
  465. {Alpha3bCode: "div", Alpha2Code: "dv", English: "Divehi; Dhivehi; Maldivian"},
  466. {Alpha3bCode: "dut", Alpha2Code: "nl", English: "Dutch; Flemish"},
  467. {Alpha3bCode: "dzo", Alpha2Code: "dz", English: "Dzongkha"},
  468. {Alpha3bCode: "eng", Alpha2Code: "en", English: "English"},
  469. {Alpha3bCode: "epo", Alpha2Code: "eo", English: "Esperanto"},
  470. {Alpha3bCode: "est", Alpha2Code: "et", English: "Estonian"},
  471. {Alpha3bCode: "ewe", Alpha2Code: "ee", English: "Ewe"},
  472. {Alpha3bCode: "fao", Alpha2Code: "fo", English: "Faroese"},
  473. {Alpha3bCode: "fij", Alpha2Code: "fj", English: "Fijian"},
  474. {Alpha3bCode: "fin", Alpha2Code: "fi", English: "Finnish"},
  475. {Alpha3bCode: "fre", Alpha2Code: "fr", English: "French"},
  476. {Alpha3bCode: "fry", Alpha2Code: "fy", English: "Western Frisian"},
  477. {Alpha3bCode: "ful", Alpha2Code: "ff", English: "Fulah"},
  478. {Alpha3bCode: "geo", Alpha2Code: "ka", English: "Georgian"},
  479. {Alpha3bCode: "ger", Alpha2Code: "de", English: "German"},
  480. {Alpha3bCode: "gla", Alpha2Code: "gd", English: "Gaelic; Scottish Gaelic"},
  481. {Alpha3bCode: "gle", Alpha2Code: "ga", English: "Irish"},
  482. {Alpha3bCode: "glg", Alpha2Code: "gl", English: "Galician"},
  483. {Alpha3bCode: "glv", Alpha2Code: "gv", English: "Manx"},
  484. {Alpha3bCode: "gre", Alpha2Code: "el", English: "Greek, Modern (1453-)"},
  485. {Alpha3bCode: "grn", Alpha2Code: "gn", English: "Guarani"},
  486. {Alpha3bCode: "guj", Alpha2Code: "gu", English: "Gujarati"},
  487. {Alpha3bCode: "hat", Alpha2Code: "ht", English: "Haitian; Haitian Creole"},
  488. {Alpha3bCode: "hau", Alpha2Code: "ha", English: "Hausa"},
  489. {Alpha3bCode: "heb", Alpha2Code: "he", English: "Hebrew"},
  490. {Alpha3bCode: "her", Alpha2Code: "hz", English: "Herero"},
  491. {Alpha3bCode: "hin", Alpha2Code: "hi", English: "Hindi"},
  492. {Alpha3bCode: "hmo", Alpha2Code: "ho", English: "Hiri Motu"},
  493. {Alpha3bCode: "hrv", Alpha2Code: "hr", English: "Croatian"},
  494. {Alpha3bCode: "hun", Alpha2Code: "hu", English: "Hungarian"},
  495. {Alpha3bCode: "ibo", Alpha2Code: "ig", English: "Igbo"},
  496. {Alpha3bCode: "ice", Alpha2Code: "is", English: "Icelandic"},
  497. {Alpha3bCode: "ido", Alpha2Code: "io", English: "Ido"},
  498. {Alpha3bCode: "iii", Alpha2Code: "ii", English: "Sichuan Yi; Nuosu"},
  499. {Alpha3bCode: "iku", Alpha2Code: "iu", English: "Inuktitut"},
  500. {Alpha3bCode: "ile", Alpha2Code: "ie", English: "Interlingue; Occidental"},
  501. {Alpha3bCode: "ina", Alpha2Code: "ia", English: "Interlingua (International Auxiliary Language Association)"},
  502. {Alpha3bCode: "ind", Alpha2Code: "id", English: "Indonesian"},
  503. {Alpha3bCode: "ipk", Alpha2Code: "ik", English: "Inupiaq"},
  504. {Alpha3bCode: "ita", Alpha2Code: "it", English: "Italian"},
  505. {Alpha3bCode: "jav", Alpha2Code: "jv", English: "Javanese"},
  506. {Alpha3bCode: "jpn", Alpha2Code: "ja", English: "Japanese"},
  507. {Alpha3bCode: "kal", Alpha2Code: "kl", English: "Kalaallisut; Greenlandic"},
  508. {Alpha3bCode: "kan", Alpha2Code: "kn", English: "Kannada"},
  509. {Alpha3bCode: "kas", Alpha2Code: "ks", English: "Kashmiri"},
  510. {Alpha3bCode: "kau", Alpha2Code: "kr", English: "Kanuri"},
  511. {Alpha3bCode: "kaz", Alpha2Code: "kk", English: "Kazakh"},
  512. {Alpha3bCode: "khm", Alpha2Code: "km", English: "Central Khmer"},
  513. {Alpha3bCode: "kik", Alpha2Code: "ki", English: "Kikuyu; Gikuyu"},
  514. {Alpha3bCode: "kin", Alpha2Code: "rw", English: "Kinyarwanda"},
  515. {Alpha3bCode: "kir", Alpha2Code: "ky", English: "Kirghiz; Kyrgyz"},
  516. {Alpha3bCode: "kom", Alpha2Code: "kv", English: "Komi"},
  517. {Alpha3bCode: "kon", Alpha2Code: "kg", English: "Kongo"},
  518. {Alpha3bCode: "kor", Alpha2Code: "ko", English: "Korean"},
  519. {Alpha3bCode: "kua", Alpha2Code: "kj", English: "Kuanyama; Kwanyama"},
  520. {Alpha3bCode: "kur", Alpha2Code: "ku", English: "Kurdish"},
  521. {Alpha3bCode: "lao", Alpha2Code: "lo", English: "Lao"},
  522. {Alpha3bCode: "lat", Alpha2Code: "la", English: "Latin"},
  523. {Alpha3bCode: "lav", Alpha2Code: "lv", English: "Latvian"},
  524. {Alpha3bCode: "lim", Alpha2Code: "li", English: "Limburgan; Limburger; Limburgish"},
  525. {Alpha3bCode: "lin", Alpha2Code: "ln", English: "Lingala"},
  526. {Alpha3bCode: "lit", Alpha2Code: "lt", English: "Lithuanian"},
  527. {Alpha3bCode: "ltz", Alpha2Code: "lb", English: "Luxembourgish; Letzeburgesch"},
  528. {Alpha3bCode: "lub", Alpha2Code: "lu", English: "Luba-Katanga"},
  529. {Alpha3bCode: "lug", Alpha2Code: "lg", English: "Ganda"},
  530. {Alpha3bCode: "mac", Alpha2Code: "mk", English: "Macedonian"},
  531. {Alpha3bCode: "mah", Alpha2Code: "mh", English: "Marshallese"},
  532. {Alpha3bCode: "mal", Alpha2Code: "ml", English: "Malayalam"},
  533. {Alpha3bCode: "mao", Alpha2Code: "mi", English: "Maori"},
  534. {Alpha3bCode: "mar", Alpha2Code: "mr", English: "Marathi"},
  535. {Alpha3bCode: "may", Alpha2Code: "ms", English: "Malay"},
  536. {Alpha3bCode: "mlg", Alpha2Code: "mg", English: "Malagasy"},
  537. {Alpha3bCode: "mlt", Alpha2Code: "mt", English: "Maltese"},
  538. {Alpha3bCode: "mon", Alpha2Code: "mn", English: "Mongolian"},
  539. {Alpha3bCode: "nau", Alpha2Code: "na", English: "Nauru"},
  540. {Alpha3bCode: "nav", Alpha2Code: "nv", English: "Navajo; Navaho"},
  541. {Alpha3bCode: "nbl", Alpha2Code: "nr", English: "Ndebele, South; South Ndebele"},
  542. {Alpha3bCode: "nde", Alpha2Code: "nd", English: "Ndebele, North; North Ndebele"},
  543. {Alpha3bCode: "ndo", Alpha2Code: "ng", English: "Ndonga"},
  544. {Alpha3bCode: "nep", Alpha2Code: "ne", English: "Nepali"},
  545. {Alpha3bCode: "nno", Alpha2Code: "nn", English: "Norwegian Nynorsk; Nynorsk, Norwegian"},
  546. {Alpha3bCode: "nob", Alpha2Code: "nb", English: "Bokmål, Norwegian; Norwegian Bokmål"},
  547. {Alpha3bCode: "nor", Alpha2Code: "no", English: "Norwegian"},
  548. {Alpha3bCode: "nya", Alpha2Code: "ny", English: "Chichewa; Chewa; Nyanja"},
  549. {Alpha3bCode: "oci", Alpha2Code: "oc", English: "Occitan (post 1500); Provençal"},
  550. {Alpha3bCode: "oji", Alpha2Code: "oj", English: "Ojibwa"},
  551. {Alpha3bCode: "ori", Alpha2Code: "or", English: "Oriya"},
  552. {Alpha3bCode: "orm", Alpha2Code: "om", English: "Oromo"},
  553. {Alpha3bCode: "oss", Alpha2Code: "os", English: "Ossetian; Ossetic"},
  554. {Alpha3bCode: "pan", Alpha2Code: "pa", English: "Panjabi; Punjabi"},
  555. {Alpha3bCode: "per", Alpha2Code: "fa", English: "Persian"},
  556. {Alpha3bCode: "pli", Alpha2Code: "pi", English: "Pali"},
  557. {Alpha3bCode: "pol", Alpha2Code: "pl", English: "Polish"},
  558. {Alpha3bCode: "por", Alpha2Code: "pt", English: "Portuguese"},
  559. {Alpha3bCode: "pus", Alpha2Code: "ps", English: "Pushto; Pashto"},
  560. {Alpha3bCode: "que", Alpha2Code: "qu", English: "Quechua"},
  561. {Alpha3bCode: "roh", Alpha2Code: "rm", English: "Romansh"},
  562. {Alpha3bCode: "rum", Alpha2Code: "ro", English: "Romanian; Moldavian; Moldovan"},
  563. {Alpha3bCode: "run", Alpha2Code: "rn", English: "Rundi"},
  564. {Alpha3bCode: "rus", Alpha2Code: "ru", English: "Russian"},
  565. {Alpha3bCode: "sag", Alpha2Code: "sg", English: "Sango"},
  566. {Alpha3bCode: "san", Alpha2Code: "sa", English: "Sanskrit"},
  567. {Alpha3bCode: "sin", Alpha2Code: "si", English: "Sinhala; Sinhalese"},
  568. {Alpha3bCode: "slo", Alpha2Code: "sk", English: "Slovak"},
  569. {Alpha3bCode: "slv", Alpha2Code: "sl", English: "Slovenian"},
  570. {Alpha3bCode: "sme", Alpha2Code: "se", English: "Northern Sami"},
  571. {Alpha3bCode: "smo", Alpha2Code: "sm", English: "Samoan"},
  572. {Alpha3bCode: "sna", Alpha2Code: "sn", English: "Shona"},
  573. {Alpha3bCode: "snd", Alpha2Code: "sd", English: "Sindhi"},
  574. {Alpha3bCode: "som", Alpha2Code: "so", English: "Somali"},
  575. {Alpha3bCode: "sot", Alpha2Code: "st", English: "Sotho, Southern"},
  576. {Alpha3bCode: "spa", Alpha2Code: "es", English: "Spanish; Castilian"},
  577. {Alpha3bCode: "srd", Alpha2Code: "sc", English: "Sardinian"},
  578. {Alpha3bCode: "srp", Alpha2Code: "sr", English: "Serbian"},
  579. {Alpha3bCode: "ssw", Alpha2Code: "ss", English: "Swati"},
  580. {Alpha3bCode: "sun", Alpha2Code: "su", English: "Sundanese"},
  581. {Alpha3bCode: "swa", Alpha2Code: "sw", English: "Swahili"},
  582. {Alpha3bCode: "swe", Alpha2Code: "sv", English: "Swedish"},
  583. {Alpha3bCode: "tah", Alpha2Code: "ty", English: "Tahitian"},
  584. {Alpha3bCode: "tam", Alpha2Code: "ta", English: "Tamil"},
  585. {Alpha3bCode: "tat", Alpha2Code: "tt", English: "Tatar"},
  586. {Alpha3bCode: "tel", Alpha2Code: "te", English: "Telugu"},
  587. {Alpha3bCode: "tgk", Alpha2Code: "tg", English: "Tajik"},
  588. {Alpha3bCode: "tgl", Alpha2Code: "tl", English: "Tagalog"},
  589. {Alpha3bCode: "tha", Alpha2Code: "th", English: "Thai"},
  590. {Alpha3bCode: "tib", Alpha2Code: "bo", English: "Tibetan"},
  591. {Alpha3bCode: "tir", Alpha2Code: "ti", English: "Tigrinya"},
  592. {Alpha3bCode: "ton", Alpha2Code: "to", English: "Tonga (Tonga Islands)"},
  593. {Alpha3bCode: "tsn", Alpha2Code: "tn", English: "Tswana"},
  594. {Alpha3bCode: "tso", Alpha2Code: "ts", English: "Tsonga"},
  595. {Alpha3bCode: "tuk", Alpha2Code: "tk", English: "Turkmen"},
  596. {Alpha3bCode: "tur", Alpha2Code: "tr", English: "Turkish"},
  597. {Alpha3bCode: "twi", Alpha2Code: "tw", English: "Twi"},
  598. {Alpha3bCode: "uig", Alpha2Code: "ug", English: "Uighur; Uyghur"},
  599. {Alpha3bCode: "ukr", Alpha2Code: "uk", English: "Ukrainian"},
  600. {Alpha3bCode: "urd", Alpha2Code: "ur", English: "Urdu"},
  601. {Alpha3bCode: "uzb", Alpha2Code: "uz", English: "Uzbek"},
  602. {Alpha3bCode: "ven", Alpha2Code: "ve", English: "Venda"},
  603. {Alpha3bCode: "vie", Alpha2Code: "vi", English: "Vietnamese"},
  604. {Alpha3bCode: "vol", Alpha2Code: "vo", English: "Volapük"},
  605. {Alpha3bCode: "wel", Alpha2Code: "cy", English: "Welsh"},
  606. {Alpha3bCode: "wln", Alpha2Code: "wa", English: "Walloon"},
  607. {Alpha3bCode: "wol", Alpha2Code: "wo", English: "Wolof"},
  608. {Alpha3bCode: "xho", Alpha2Code: "xh", English: "Xhosa"},
  609. {Alpha3bCode: "yid", Alpha2Code: "yi", English: "Yiddish"},
  610. {Alpha3bCode: "yor", Alpha2Code: "yo", English: "Yoruba"},
  611. {Alpha3bCode: "zha", Alpha2Code: "za", English: "Zhuang; Chuang"},
  612. {Alpha3bCode: "zul", Alpha2Code: "zu", English: "Zulu"},
  613. }