-
-
Save DimazzzZ/4e2a5a6c8c6f67900091 to your computer and use it in GitHub Desktop.
<?php | |
$codes = [ | |
'ab' => 'Abkhazian', | |
'aa' => 'Afar', | |
'af' => 'Afrikaans', | |
'ak' => 'Akan', | |
'sq' => 'Albanian', | |
'am' => 'Amharic', | |
'ar' => 'Arabic', | |
'an' => 'Aragonese', | |
'hy' => 'Armenian', | |
'as' => 'Assamese', | |
'av' => 'Avaric', | |
'ae' => 'Avestan', | |
'ay' => 'Aymara', | |
'az' => 'Azerbaijani', | |
'bm' => 'Bambara', | |
'ba' => 'Bashkir', | |
'eu' => 'Basque', | |
'be' => 'Belarusian', | |
'bn' => 'Bengali', | |
'bh' => 'Bihari languages', | |
'bi' => 'Bislama', | |
'bs' => 'Bosnian', | |
'br' => 'Breton', | |
'bg' => 'Bulgarian', | |
'my' => 'Burmese', | |
'ca' => 'Catalan, Valencian', | |
'km' => 'Central Khmer', | |
'ch' => 'Chamorro', | |
'ce' => 'Chechen', | |
'ny' => 'Chichewa, Chewa, Nyanja', | |
'zh' => 'Chinese', | |
'cu' => 'Church Slavonic, Old Bulgarian, Old Church Slavonic', | |
'cv' => 'Chuvash', | |
'kw' => 'Cornish', | |
'co' => 'Corsican', | |
'cr' => 'Cree', | |
'hr' => 'Croatian', | |
'cs' => 'Czech', | |
'da' => 'Danish', | |
'dv' => 'Divehi, Dhivehi, Maldivian', | |
'nl' => 'Dutch, Flemish', | |
'dz' => 'Dzongkha', | |
'en' => 'English', | |
'eo' => 'Esperanto', | |
'et' => 'Estonian', | |
'ee' => 'Ewe', | |
'fo' => 'Faroese', | |
'fj' => 'Fijian', | |
'fi' => 'Finnish', | |
'fr' => 'French', | |
'ff' => 'Fulah', | |
'gd' => 'Gaelic, Scottish Gaelic', | |
'gl' => 'Galician', | |
'lg' => 'Ganda', | |
'ka' => 'Georgian', | |
'de' => 'German', | |
'ki' => 'Gikuyu, Kikuyu', | |
'el' => 'Greek (Modern)', | |
'kl' => 'Greenlandic, Kalaallisut', | |
'gn' => 'Guarani', | |
'gu' => 'Gujarati', | |
'ht' => 'Haitian, Haitian Creole', | |
'ha' => 'Hausa', | |
'he' => 'Hebrew', | |
'hz' => 'Herero', | |
'hi' => 'Hindi', | |
'ho' => 'Hiri Motu', | |
'hu' => 'Hungarian', | |
'is' => 'Icelandic', | |
'io' => 'Ido', | |
'ig' => 'Igbo', | |
'id' => 'Indonesian', | |
'ia' => 'Interlingua (International Auxiliary Language Association)', | |
'ie' => 'Interlingue', | |
'iu' => 'Inuktitut', | |
'ik' => 'Inupiaq', | |
'ga' => 'Irish', | |
'it' => 'Italian', | |
'ja' => 'Japanese', | |
'jv' => 'Javanese', | |
'kn' => 'Kannada', | |
'kr' => 'Kanuri', | |
'ks' => 'Kashmiri', | |
'kk' => 'Kazakh', | |
'rw' => 'Kinyarwanda', | |
'kv' => 'Komi', | |
'kg' => 'Kongo', | |
'ko' => 'Korean', | |
'kj' => 'Kwanyama, Kuanyama', | |
'ku' => 'Kurdish', | |
'ky' => 'Kyrgyz', | |
'lo' => 'Lao', | |
'la' => 'Latin', | |
'lv' => 'Latvian', | |
'lb' => 'Letzeburgesch, Luxembourgish', | |
'li' => 'Limburgish, Limburgan, Limburger', | |
'ln' => 'Lingala', | |
'lt' => 'Lithuanian', | |
'lu' => 'Luba-Katanga', | |
'mk' => 'Macedonian', | |
'mg' => 'Malagasy', | |
'ms' => 'Malay', | |
'ml' => 'Malayalam', | |
'mt' => 'Maltese', | |
'gv' => 'Manx', | |
'mi' => 'Maori', | |
'mr' => 'Marathi', | |
'mh' => 'Marshallese', | |
'ro' => 'Moldovan, Moldavian, Romanian', | |
'mn' => 'Mongolian', | |
'na' => 'Nauru', | |
'nv' => 'Navajo, Navaho', | |
'nd' => 'Northern Ndebele', | |
'ng' => 'Ndonga', | |
'ne' => 'Nepali', | |
'se' => 'Northern Sami', | |
'no' => 'Norwegian', | |
'nb' => 'Norwegian Bokmål', | |
'nn' => 'Norwegian Nynorsk', | |
'ii' => 'Nuosu, Sichuan Yi', | |
'oc' => 'Occitan (post 1500)', | |
'oj' => 'Ojibwa', | |
'or' => 'Oriya', | |
'om' => 'Oromo', | |
'os' => 'Ossetian, Ossetic', | |
'pi' => 'Pali', | |
'pa' => 'Panjabi, Punjabi', | |
'ps' => 'Pashto, Pushto', | |
'fa' => 'Persian', | |
'pl' => 'Polish', | |
'pt' => 'Portuguese', | |
'qu' => 'Quechua', | |
'rm' => 'Romansh', | |
'rn' => 'Rundi', | |
'ru' => 'Russian', | |
'sm' => 'Samoan', | |
'sg' => 'Sango', | |
'sa' => 'Sanskrit', | |
'sc' => 'Sardinian', | |
'sr' => 'Serbian', | |
'sn' => 'Shona', | |
'sd' => 'Sindhi', | |
'si' => 'Sinhala, Sinhalese', | |
'sk' => 'Slovak', | |
'sl' => 'Slovenian', | |
'so' => 'Somali', | |
'st' => 'Sotho, Southern', | |
'nr' => 'South Ndebele', | |
'es' => 'Spanish, Castilian', | |
'su' => 'Sundanese', | |
'sw' => 'Swahili', | |
'ss' => 'Swati', | |
'sv' => 'Swedish', | |
'tl' => 'Tagalog', | |
'ty' => 'Tahitian', | |
'tg' => 'Tajik', | |
'ta' => 'Tamil', | |
'tt' => 'Tatar', | |
'te' => 'Telugu', | |
'th' => 'Thai', | |
'bo' => 'Tibetan', | |
'ti' => 'Tigrinya', | |
'to' => 'Tonga (Tonga Islands)', | |
'ts' => 'Tsonga', | |
'tn' => 'Tswana', | |
'tr' => 'Turkish', | |
'tk' => 'Turkmen', | |
'tw' => 'Twi', | |
'ug' => 'Uighur, Uyghur', | |
'uk' => 'Ukrainian', | |
'ur' => 'Urdu', | |
'uz' => 'Uzbek', | |
've' => 'Venda', | |
'vi' => 'Vietnamese', | |
'vo' => 'Volap_k', | |
'wa' => 'Walloon', | |
'cy' => 'Welsh', | |
'fy' => 'Western Frisian', | |
'wo' => 'Wolof', | |
'xh' => 'Xhosa', | |
'yi' => 'Yiddish', | |
'yo' => 'Yoruba', | |
'za' => 'Zhuang, Chuang', | |
'zu' => 'Zulu' | |
]; |
Here's a keyed php array 👍
$isoData = [
['code' => 'ab', 'name' => 'Abkhazian'],
['code' => 'aa', 'name' => 'Afar'],
['code' => 'af', 'name' => 'Afrikaans'],
['code' => 'ak', 'name' => 'Akan'],
['code' => 'sq', 'name' => 'Albanian'],
['code' => 'am', 'name' => 'Amharic'],
['code' => 'ar', 'name' => 'Arabic'],
['code' => 'an', 'name' => 'Aragonese'],
['code' => 'hy', 'name' => 'Armenian'],
['code' => 'as', 'name' => 'Assamese'],
['code' => 'av', 'name' => 'Avaric'],
['code' => 'ae', 'name' => 'Avestan'],
['code' => 'ay', 'name' => 'Aymara'],
['code' => 'az', 'name' => 'Azerbaijani'],
['code' => 'bm', 'name' => 'Bambara'],
['code' => 'ba', 'name' => 'Bashkir'],
['code' => 'eu', 'name' => 'Basque'],
['code' => 'be', 'name' => 'Belarusian'],
['code' => 'bn', 'name' => 'Bengali'],
['code' => 'bh', 'name' => 'Bihari languages'],
['code' => 'bi', 'name' => 'Bislama'],
['code' => 'bs', 'name' => 'Bosnian'],
['code' => 'br', 'name' => 'Breton'],
['code' => 'bg', 'name' => 'Bulgarian'],
['code' => 'my', 'name' => 'Burmese'],
['code' => 'ca', 'name' => 'Catalan, Valcodeian'],
['code' => 'km', 'name' => 'Central Khmer'],
['code' => 'ch', 'name' => 'Chamorro'],
['code' => 'ce', 'name' => 'Chechen'],
['code' => 'ny', 'name' => 'Chichewa, Chewa, Nyanja'],
['code' => 'zh', 'name' => 'Chinese'],
['code' => 'cu', 'name' => 'Church Slavonic, Old Bulgarian, Old Church Slavonic'],
['code' => 'cv', 'name' => 'Chuvash'],
['code' => 'kw', 'name' => 'Cornish'],
['code' => 'co', 'name' => 'Corsican'],
['code' => 'cr', 'name' => 'Cree'],
['code' => 'hr', 'name' => 'Croatian'],
['code' => 'cs', 'name' => 'Czech'],
['code' => 'da', 'name' => 'Danish'],
['code' => 'dv', 'name' => 'Divehi, Dhivehi, Maldivian'],
['code' => 'nl', 'name' => 'Dutch, Flemish'],
['code' => 'dz', 'name' => 'Dzongkha'],
['code' => 'en', 'name' => 'English'],
['code' => 'eo', 'name' => 'Esperanto'],
['code' => 'et', 'name' => 'Estonian'],
['code' => 'ee', 'name' => 'Ewe'],
['code' => 'fo', 'name' => 'Faroese'],
['code' => 'fj', 'name' => 'Fijian'],
['code' => 'fi', 'name' => 'Finnish'],
['code' => 'fr', 'name' => 'Frcodeh'],
['code' => 'ff', 'name' => 'Fulah'],
['code' => 'gd', 'name' => 'Gaelic, Scottish Gaelic'],
['code' => 'gl', 'name' => 'Galician'],
['code' => 'lg', 'name' => 'Ganda'],
['code' => 'ka', 'name' => 'Georgian'],
['code' => 'de', 'name' => 'German'],
['code' => 'ki', 'name' => 'Gikuyu, Kikuyu'],
['code' => 'el', 'name' => 'Greek (Modern)'],
['code' => 'kl', 'name' => 'Greenlandic, Kalaallisut'],
['code' => 'gn', 'name' => 'Guarani'],
['code' => 'gu', 'name' => 'Gujarati'],
['code' => 'ht', 'name' => 'Haitian, Haitian Creole'],
['code' => 'ha', 'name' => 'Hausa'],
['code' => 'he', 'name' => 'Hebrew'],
['code' => 'hz', 'name' => 'Herero'],
['code' => 'hi', 'name' => 'Hindi'],
['code' => 'ho', 'name' => 'Hiri Motu'],
['code' => 'hu', 'name' => 'Hungarian'],
['code' => 'is', 'name' => 'Icelandic'],
['code' => 'io', 'name' => 'Ido'],
['code' => 'ig', 'name' => 'Igbo'],
['code' => 'id', 'name' => 'Indonesian'],
['code' => 'ia', 'name' => 'Interlingua (International Auxiliary Language Association)'],
['code' => 'ie', 'name' => 'Interlingue'],
['code' => 'iu', 'name' => 'Inuktitut'],
['code' => 'ik', 'name' => 'Inupiaq'],
['code' => 'ga', 'name' => 'Irish'],
['code' => 'it', 'name' => 'Italian'],
['code' => 'ja', 'name' => 'Japanese'],
['code' => 'jv', 'name' => 'Javanese'],
['code' => 'kn', 'name' => 'Kannada'],
['code' => 'kr', 'name' => 'Kanuri'],
['code' => 'ks', 'name' => 'Kashmiri'],
['code' => 'kk', 'name' => 'Kazakh'],
['code' => 'rw', 'name' => 'Kinyarwanda'],
['code' => 'kv', 'name' => 'Komi'],
['code' => 'kg', 'name' => 'Kongo'],
['code' => 'ko', 'name' => 'Korean'],
['code' => 'kj', 'name' => 'Kwanyama, Kuanyama'],
['code' => 'ku', 'name' => 'Kurdish'],
['code' => 'ky', 'name' => 'Kyrgyz'],
['code' => 'lo', 'name' => 'Lao'],
['code' => 'la', 'name' => 'Latin'],
['code' => 'lv', 'name' => 'Latvian'],
['code' => 'lb', 'name' => 'Letzeburgesch, Luxembourgish'],
['code' => 'li', 'name' => 'Limburgish, Limburgan, Limburger'],
['code' => 'ln', 'name' => 'Lingala'],
['code' => 'lt', 'name' => 'Lithuanian'],
['code' => 'lu', 'name' => 'Luba-Katanga'],
['code' => 'mk', 'name' => 'Macedonian'],
['code' => 'mg', 'name' => 'Malagasy'],
['code' => 'ms', 'name' => 'Malay'],
['code' => 'ml', 'name' => 'Malayalam'],
['code' => 'mt', 'name' => 'Maltese'],
['code' => 'gv', 'name' => 'Manx'],
['code' => 'mi', 'name' => 'Maori'],
['code' => 'mr', 'name' => 'Marathi'],
['code' => 'mh', 'name' => 'Marshallese'],
['code' => 'ro', 'name' => 'Moldovan, Moldavian, Romanian'],
['code' => 'mn', 'name' => 'Mongolian'],
['code' => 'na', 'name' => 'Nauru'],
['code' => 'nv', 'name' => 'Navajo, Navaho'],
['code' => 'nd', 'name' => 'Northern Ndebele'],
['code' => 'ng', 'name' => 'Ndonga'],
['code' => 'ne', 'name' => 'Nepali'],
['code' => 'se', 'name' => 'Northern Sami'],
['code' => 'no', 'name' => 'Norwegian'],
['code' => 'nb', 'name' => 'Norwegian Bokmål'],
['code' => 'nn', 'name' => 'Norwegian Nynorsk'],
['code' => 'ii', 'name' => 'Nuosu, Sichuan Yi'],
['code' => 'oc', 'name' => 'Occitan (post 1500)'],
['code' => 'oj', 'name' => 'Ojibwa'],
['code' => 'or', 'name' => 'Oriya'],
['code' => 'om', 'name' => 'Oromo'],
['code' => 'os', 'name' => 'Ossetian, Ossetic'],
['code' => 'pi', 'name' => 'Pali'],
['code' => 'pa', 'name' => 'Panjabi, Punjabi'],
['code' => 'ps', 'name' => 'Pashto, Pushto'],
['code' => 'fa', 'name' => 'Persian'],
['code' => 'pl', 'name' => 'Polish'],
['code' => 'pt', 'name' => 'Portuguese'],
['code' => 'qu', 'name' => 'Quechua'],
['code' => 'rm', 'name' => 'Romansh'],
['code' => 'rn', 'name' => 'Rundi'],
['code' => 'ru', 'name' => 'Russian'],
['code' => 'sm', 'name' => 'Samoan'],
['code' => 'sg', 'name' => 'Sango'],
['code' => 'sa', 'name' => 'Sanskrit'],
['code' => 'sc', 'name' => 'Sardinian'],
['code' => 'sr', 'name' => 'Serbian'],
['code' => 'sn', 'name' => 'Shona'],
['code' => 'sd', 'name' => 'Sindhi'],
['code' => 'si', 'name' => 'Sinhala, Sinhalese'],
['code' => 'sk', 'name' => 'Slovak'],
['code' => 'sl', 'name' => 'Slovenian'],
['code' => 'so', 'name' => 'Somali'],
['code' => 'st', 'name' => 'Sotho, Southern'],
['code' => 'nr', 'name' => 'South Ndebele'],
['code' => 'es', 'name' => 'Spanish, Castilian'],
['code' => 'su', 'name' => 'Sundanese'],
['code' => 'sw', 'name' => 'Swahili'],
['code' => 'ss', 'name' => 'Swati'],
['code' => 'sv', 'name' => 'Swedish'],
['code' => 'tl', 'name' => 'Tagalog'],
['code' => 'ty', 'name' => 'Tahitian'],
['code' => 'tg', 'name' => 'Tajik'],
['code' => 'ta', 'name' => 'Tamil'],
['code' => 'tt', 'name' => 'Tatar'],
['code' => 'te', 'name' => 'Telugu'],
['code' => 'th', 'name' => 'Thai'],
['code' => 'bo', 'name' => 'Tibetan'],
['code' => 'ti', 'name' => 'Tigrinya'],
['code' => 'to', 'name' => 'Tonga (Tonga Islands)'],
['code' => 'ts', 'name' => 'Tsonga'],
['code' => 'tn', 'name' => 'Tswana'],
['code' => 'tr', 'name' => 'Turkish'],
['code' => 'tk', 'name' => 'Turkmen'],
['code' => 'tw', 'name' => 'Twi'],
['code' => 'ug', 'name' => 'Uighur, Uyghur'],
['code' => 'uk', 'name' => 'Ukrainian'],
['code' => 'ur', 'name' => 'Urdu'],
['code' => 'uz', 'name' => 'Uzbek'],
['code' => 've', 'name' => 'Venda'],
['code' => 'vi', 'name' => 'Vietnamese'],
['code' => 'vo', 'name' => 'Volap_k'],
['code' => 'wa', 'name' => 'Walloon'],
['code' => 'cy', 'name' => 'Welsh'],
['code' => 'fy', 'name' => 'Western Frisian'],
['code' => 'wo', 'name' => 'Wolof'],
['code' => 'xh', 'name' => 'Xhosa'],
['code' => 'yi', 'name' => 'Yiddish'],
['code' => 'yo', 'name' => 'Yoruba'],
['code' => 'za', 'name' => 'Zhuang, Chuang'],
['code' => 'zu', 'name' => 'Zulu']
];
let codes = ['ab','aa','af','ak','sq','am','ar','an','hy','as','av','ae','ay','az','bm','ba','eu','be','bn','bh','bi','bs','br','bg','my','ca','km','ch','ce','ny','zh','cu','cv','kw','co','cr','hr','cs','da','dv','nl','dz','en','eo','et','ee','fo','fj','fi','fr','ff','gd','gl','lg','ka','de','ki','el','kl','gn','gu','ht','ha','he','hz','hi','ho','hu','is','io','ig','id','ia','ie','iu','ik','ga','it','ja','jv','kn','kr','ks','kk','rw','kv','kg','ko','kj','ku','ky','lo','la','lv','lb','li','ln','lt','lu','mk','mg','ms','ml','mt','gv','mi','mr','mh','ro','mn','na','nv','nd','ng','ne','se','no','nb','nn','ii','oc','oj','or','om','os','pi','pa','ps','fa','pl','pt','qu','rm','rn','ru','sm','sg','sa','sc','sr','sn','sd','si','sk','sl','so','st','nr','es','su','sw','ss','sv','tl','ty','tg','ta','tt','te','th','bo','ti','to','ts','tn','tr','tk','tw','ug','uk','ur','uz','ve','vi','vo','wa','cy','fy','wo','xh','yi','yo','za','zu'];
['code' => 'fr', 'name' => 'Frcodeh'],
Might wanna fix that
let names = [
'Abkhazian',
'Afar',
'Afrikaans',
'Akan',
'Albanian',
'Amharic',
'Arabic',
'Aragonese',
'Armenian',
'Assamese',
'Avaric',
'Avestan',
'Aymara',
'Azerbaijani',
'Bambara',
'Bashkir',
'Basque',
'Belarusian',
'Bengali',
'Bihari languages',
'Bislama',
'Bosnian',
'Breton',
'Bulgarian',
'Burmese',
'Catalan, Valencian',
'Central Khmer',
'Chamorro',
'Chechen',
'Chichewa, Chewa, Nyanja',
'Chinese',
'Church Slavonic, Old Bulgarian, Old Church Slavonic',
'Chuvash',
'Cornish',
'Corsican',
'Cree',
'Croatian',
'Czech',
'Danish',
'Divehi, Dhivehi, Maldivian',
'Dutch, Flemish',
'Dzongkha',
'English',
'Esperanto',
'Estonian',
'Ewe',
'Faroese',
'Fijian',
'Finnish',
'French',
'Fulah',
'Gaelic, Scottish Gaelic',
'Galician',
'Ganda',
'Georgian',
'German',
'Gikuyu, Kikuyu',
'Greek (Modern)',
'Greenlandic, Kalaallisut',
'Guarani',
'Gujarati',
'Haitian, Haitian Creole',
'Hausa',
'Hebrew',
'Herero',
'Hindi',
'Hiri Motu',
'Hungarian',
'Icelandic',
'Ido',
'Igbo',
'Indonesian',
'Interlingua (International Auxiliary Language Association)',
'Interlingue',
'Inuktitut',
'Inupiaq',
'Irish',
'Italian',
'Japanese',
'Javanese',
'Kannada',
'Kanuri',
'Kashmiri',
'Kazakh',
'Kinyarwanda',
'Komi',
'Kongo',
'Korean',
'Kwanyama, Kuanyama',
'Kurdish',
'Kyrgyz',
'Lao',
'Latin',
'Latvian',
'Letzeburgesch, Luxembourgish',
'Limburgish, Limburgan, Limburger',
'Lingala',
'Lithuanian',
'Luba-Katanga',
'Macedonian',
'Malagasy',
'Malay',
'Malayalam',
'Maltese',
'Manx',
'Maori',
'Marathi',
'Marshallese',
'Moldovan, Moldavian, Romanian',
'Mongolian',
'Nauru',
'Navajo, Navaho',
'Northern Ndebele',
'Ndonga',
'Nepali',
'Northern Sami',
'Norwegian',
'Norwegian Bokmål',
'Norwegian Nynorsk',
'Nuosu, Sichuan Yi',
'Occitan (post 1500)',
'Ojibwa',
'Oriya',
'Oromo',
'Ossetian, Ossetic',
'Pali',
'Panjabi, Punjabi',
'Pashto, Pushto',
'Persian',
'Polish',
'Portuguese',
'Quechua',
'Romansh',
'Rundi',
'Russian',
'Samoan',
'Sango',
'Sanskrit',
'Sardinian',
'Serbian',
'Shona',
'Sindhi',
'Sinhala, Sinhalese',
'Slovak',
'Slovenian',
'Somali',
'Sotho, Southern',
'South Ndebele',
'Spanish, Castilian',
'Sundanese',
'Swahili',
'Swati',
'Swedish',
'Tagalog',
'Tahitian',
'Tajik',
'Tamil',
'Tatar',
'Telugu',
'Thai',
'Tibetan',
'Tigrinya',
'Tonga (Tonga Islands)',
'Tsonga',
'Tswana',
'Turkish',
'Turkmen',
'Twi',
'Uighur, Uyghur',
'Ukrainian',
'Urdu',
'Uzbek',
'Venda',
'Vietnamese',
'Volap_k',
'Walloon',
'Welsh',
'Western Frisian',
'Wolof',
'Xhosa',
'Yiddish',
'Yoruba',
'Zhuang, Chuang',
'Zulu'
];
Go version:
var languages = []string{
"ab",
"aa",
"af",
"ak",
"sq",
"am",
"ar",
"an",
"hy",
"as",
"av",
"ae",
"ay",
"az",
"bm",
"ba",
"eu",
"be",
"bn",
"bh",
"bi",
"bs",
"br",
"bg",
"my",
"ca",
"km",
"ch",
"ce",
"ny",
"zh",
"cu",
"cv",
"kw",
"co",
"cr",
"hr",
"cs",
"da",
"dv",
"nl",
"dz",
"en",
"eo",
"et",
"ee",
"fo",
"fj",
"fi",
"fr",
"ff",
"gd",
"gl",
"lg",
"ka",
"de",
"ki",
"el",
"kl",
"gn",
"gu",
"ht",
"ha",
"he",
"hz",
"hi",
"ho",
"hu",
"is",
"io",
"ig",
"id",
"ia",
"ie",
"iu",
"ik",
"ga",
"it",
"ja",
"jv",
"kn",
"kr",
"ks",
"kk",
"rw",
"kv",
"kg",
"ko",
"kj",
"ku",
"ky",
"lo",
"la",
"lv",
"lb",
"li",
"ln",
"lt",
"lu",
"mk",
"mg",
"ms",
"ml",
"mt",
"gv",
"mi",
"mr",
"mh",
"ro",
"mn",
"na",
"nv",
"nd",
"ng",
"ne",
"se",
"no",
"nb",
"nn",
"ii",
"oc",
"oj",
"or",
"om",
"os",
"pi",
"pa",
"ps",
"fa",
"pl",
"pt",
"qu",
"rm",
"rn",
"ru",
"sm",
"sg",
"sa",
"sc",
"sr",
"sn",
"sd",
"si",
"sk",
"sl",
"so",
"st",
"nr",
"es",
"su",
"sw",
"ss",
"sv",
"tl",
"ty",
"tg",
"ta",
"tt",
"te",
"th",
"bo",
"ti",
"to",
"ts",
"tn",
"tr",
"tk",
"tw",
"ug",
"uk",
"ur",
"uz",
"ve",
"vi",
"vo",
"wa",
"cy",
"fy",
"wo",
"xh",
"yi",
"yo",
"za",
"zu",
}
swift version:
enum Language {
case AB, AA, AF, AK, SQ, AM, AR, AN, HY, AS, AV, AE, AY, AZ, BM, BA, EU, BE, BN, BH, BI, BS, BR, BG, MY, CA, KM, CH, CE, NY, ZH, CU, CV, KW, CO, CR, HR, CS, DA, DV, NL, DZ, EN, EO, ET, EE, FO, FJ, FI, FR, FF, GD, GL, LG, KA, DE, KI, EL, KL, GN, GU, HT, HA, HE, HZ, HI, HO, HU, IS, IO, IG, ID, IA, IE, IU, IK, GA, IT, JA, JV, KN, KR, KS, KK, RW, KV, KG, KO, KJ, KU, KY, LO, LA, LV, LB, LI, LN, LT, LU, MK, MG, MS, ML, MT, GV, MI, MR, MH, RO, MN, NA, NV, ND, NG, NE, SE, NO, NB, NN, II, OC, OJ, OR, OM, OS, PI, PA, PS, FA, PL, PT, QU, RM, RN, RU, SM, SG, SA, SC, SR, SN, SD, SI, SK, SL, SO, ST, NR, ES, SU, SW, SS, SV, TL, TY, TG, TA, TT, TE, TH, BO, TI, TO, TS, TN, TR, TK, TW, UG, UK, UR, UZ, VE, VI, VO, WA, CY, FY, WO, XH, YI, YO, ZA, ZU
}
const languages = {
'ab': 'Abkhazian',
'aa': 'Afar',
'af': 'Afrikaans',
'ak': 'Akan',
'sq': 'Albanian',
'am': 'Amharic',
'ar': 'Arabic',
'an': 'Aragonese',
'hy': 'Armenian',
'as': 'Assamese',
'av': 'Avaric',
'ae': 'Avestan',
'ay': 'Aymara',
'az': 'Azerbaijani',
'bm': 'Bambara',
'ba': 'Bashkir',
'eu': 'Basque',
'be': 'Belarusian',
'bn': 'Bengali',
'bh': 'Bihari languages',
'bi': 'Bislama',
'bs': 'Bosnian',
'br': 'Breton',
'bg': 'Bulgarian',
'my': 'Burmese',
'ca': 'Catalan, Valencian',
'km': 'Central Khmer',
'ch': 'Chamorro',
'ce': 'Chechen',
'ny': 'Chichewa, Chewa, Nyanja',
'zh': 'Chinese',
'cu': 'Church Slavonic, Old Bulgarian, Old Church Slavonic',
'cv': 'Chuvash',
'kw': 'Cornish',
'co': 'Corsican',
'cr': 'Cree',
'hr': 'Croatian',
'cs': 'Czech',
'da': 'Danish',
'dv': 'Divehi, Dhivehi, Maldivian',
'nl': 'Dutch, Flemish',
'dz': 'Dzongkha',
'en': 'English',
'eo': 'Esperanto',
'et': 'Estonian',
'ee': 'Ewe',
'fo': 'Faroese',
'fj': 'Fijian',
'fi': 'Finnish',
'fr': 'French',
'ff': 'Fulah',
'gd': 'Gaelic, Scottish Gaelic',
'gl': 'Galician',
'lg': 'Ganda',
'ka': 'Georgian',
'de': 'German',
'ki': 'Gikuyu, Kikuyu',
'el': 'Greek (Modern)',
'kl': 'Greenlandic, Kalaallisut',
'gn': 'Guarani',
'gu': 'Gujarati',
'ht': 'Haitian, Haitian Creole',
'ha': 'Hausa',
'he': 'Hebrew',
'hz': 'Herero',
'hi': 'Hindi',
'ho': 'Hiri Motu',
'hu': 'Hungarian',
'is': 'Icelandic',
'io': 'Ido',
'ig': 'Igbo',
'id': 'Indonesian',
'ia': 'Interlingua (International Auxiliary Language Association)',
'ie': 'Interlingue',
'iu': 'Inuktitut',
'ik': 'Inupiaq',
'ga': 'Irish',
'it': 'Italian',
'ja': 'Japanese',
'jv': 'Javanese',
'kn': 'Kannada',
'kr': 'Kanuri',
'ks': 'Kashmiri',
'kk': 'Kazakh',
'rw': 'Kinyarwanda',
'kv': 'Komi',
'kg': 'Kongo',
'ko': 'Korean',
'kj': 'Kwanyama, Kuanyama',
'ku': 'Kurdish',
'ky': 'Kyrgyz',
'lo': 'Lao',
'la': 'Latin',
'lv': 'Latvian',
'lb': 'Letzeburgesch, Luxembourgish',
'li': 'Limburgish, Limburgan, Limburger',
'ln': 'Lingala',
'lt': 'Lithuanian',
'lu': 'Luba-Katanga',
'mk': 'Macedonian',
'mg': 'Malagasy',
'ms': 'Malay',
'ml': 'Malayalam',
'mt': 'Maltese',
'gv': 'Manx',
'mi': 'Maori',
'mr': 'Marathi',
'mh': 'Marshallese',
'ro': 'Moldovan, Moldavian, Romanian',
'mn': 'Mongolian',
'na': 'Nauru',
'nv': 'Navajo, Navaho',
'nd': 'Northern Ndebele',
'ng': 'Ndonga',
'ne': 'Nepali',
'se': 'Northern Sami',
'no': 'Norwegian',
'nb': 'Norwegian Bokmål',
'nn': 'Norwegian Nynorsk',
'ii': 'Nuosu, Sichuan Yi',
'oc': 'Occitan (post 1500)',
'oj': 'Ojibwa',
'or': 'Oriya',
'om': 'Oromo',
'os': 'Ossetian, Ossetic',
'pi': 'Pali',
'pa': 'Panjabi, Punjabi',
'ps': 'Pashto, Pushto',
'fa': 'Persian',
'pl': 'Polish',
'pt': 'Portuguese',
'qu': 'Quechua',
'rm': 'Romansh',
'rn': 'Rundi',
'ru': 'Russian',
'sm': 'Samoan',
'sg': 'Sango',
'sa': 'Sanskrit',
'sc': 'Sardinian',
'sr': 'Serbian',
'sn': 'Shona',
'sd': 'Sindhi',
'si': 'Sinhala, Sinhalese',
'sk': 'Slovak',
'sl': 'Slovenian',
'so': 'Somali',
'st': 'Sotho, Southern',
'nr': 'South Ndebele',
'es': 'Spanish, Castilian',
'su': 'Sundanese',
'sw': 'Swahili',
'ss': 'Swati',
'sv': 'Swedish',
'tl': 'Tagalog',
'ty': 'Tahitian',
'tg': 'Tajik',
'ta': 'Tamil',
'tt': 'Tatar',
'te': 'Telugu',
'th': 'Thai',
'bo': 'Tibetan',
'ti': 'Tigrinya',
'to': 'Tonga (Tonga Islands)',
'ts': 'Tsonga',
'tn': 'Tswana',
'tr': 'Turkish',
'tk': 'Turkmen',
'tw': 'Twi',
'ug': 'Uighur, Uyghur',
'uk': 'Ukrainian',
'ur': 'Urdu',
'uz': 'Uzbek',
've': 'Venda',
'vi': 'Vietnamese',
'vo': 'Volap_k',
'wa': 'Walloon',
'cy': 'Welsh',
'fy': 'Western Frisian',
'wo': 'Wolof',
'xh': 'Xhosa',
'yi': 'Yiddish',
'yo': 'Yoruba',
'za': 'Zhuang, Chuang',
'zu': 'Zulu',
};
export default languages;
🚀 TypeScript 🚀
export type LanguageType = {
code: string;
language: string;
}
export const languages: LanguageType[] =
[
{code: 'ab', language: 'Abkhazian'},
{code: 'aa', language: 'Afar'},
{code: 'af', language: 'Afrikaans'},
{code: 'ak', language: 'Akan'},
{code: 'sq', language: 'Albanian'},
{code: 'am', language: 'Amharic'},
{code: 'ar', language: 'Arabic'},
{code: 'an', language: 'Aragonese'},
{code: 'hy', language: 'Armenian'},
{code: 'as', language: 'Assamese'},
{code: 'av', language: 'Avaric'},
{code: 'ae', language: 'Avestan'},
{code: 'ay', language: 'Aymara'},
{code: 'az', language: 'Azerbaijani'},
{code: 'bm', language: 'Bambara'},
{code: 'ba', language: 'Bashkir'},
{code: 'eu', language: 'Basque'},
{code: 'be', language: 'Belarusian'},
{code: 'bn', language: 'Bengali'},
{code: 'bh', language: 'Bihari languages'},
{code: 'bi', language: 'Bislama'},
{code: 'bs', language: 'Bosnian'},
{code: 'br', language: 'Breton'},
{code: 'bg', language: 'Bulgarian'},
{code: 'my', language: 'Burmese'},
{code: 'ca', language: 'Catalan, Valencian'},
{code: 'km', language: 'Central Khmer'},
{code: 'ch', language: 'Chamorro'},
{code: 'ce', language: 'Chechen'},
{code: 'ny', language: 'Chichewa, Chewa, Nyanja'},
{code: 'zh', language: 'Chinese'},
{code: 'cu', language: 'Church Slavonic, Old Bulgarian, Old Church Slavonic'},
{code: 'cv', language: 'Chuvash'},
{code: 'kw', language: 'Cornish'},
{code: 'co', language: 'Corsican'},
{code: 'cr', language: 'Cree'},
{code: 'hr', language: 'Croatian'},
{code: 'cs', language: 'Czech'},
{code: 'da', language: 'Danish'},
{code: 'dv', language: 'Divehi, Dhivehi, Maldivian'},
{code: 'nl', language: 'Dutch, Flemish'},
{code: 'dz', language: 'Dzongkha'},
{code: 'en', language: 'English'},
{code: 'eo', language: 'Esperanto'},
{code: 'et', language: 'Estonian'},
{code: 'ee', language: 'Ewe'},
{code: 'fo', language: 'Faroese'},
{code: 'fj', language: 'Fijian'},
{code: 'fi', language: 'Finnish'},
{code: 'fr', language: 'French'},
{code: 'ff', language: 'Fulah'},
{code: 'gd', language: 'Gaelic, Scottish Gaelic'},
{code: 'gl', language: 'Galician'},
{code: 'lg', language: 'Ganda'},
{code: 'ka', language: 'Georgian'},
{code: 'de', language: 'German'},
{code: 'ki', language: 'Gikuyu, Kikuyu'},
{code: 'el', language: 'Greek (Modern)'},
{code: 'kl', language: 'Greenlandic, Kalaallisut'},
{code: 'gn', language: 'Guarani'},
{code: 'gu', language: 'Gujarati'},
{code: 'ht', language: 'Haitian, Haitian Creole'},
{code: 'ha', language: 'Hausa'},
{code: 'he', language: 'Hebrew'},
{code: 'hz', language: 'Herero'},
{code: 'hi', language: 'Hindi'},
{code: 'ho', language: 'Hiri Motu'},
{code: 'hu', language: 'Hungarian'},
{code: 'is', language: 'Icelandic'},
{code: 'io', language: 'Ido'},
{code: 'ig', language: 'Igbo'},
{code: 'id', language: 'Indonesian'},
{code: 'ia', language: 'Interlingua (International Auxiliary Language Association)'},
{code: 'ie', language: 'Interlingue'},
{code: 'iu', language: 'Inuktitut'},
{code: 'ik', language: 'Inupiaq'},
{code: 'ga', language: 'Irish'},
{code: 'it', language: 'Italian'},
{code: 'ja', language: 'Japanese'},
{code: 'jv', language: 'Javanese'},
{code: 'kn', language: 'Kannada'},
{code: 'kr', language: 'Kanuri'},
{code: 'ks', language: 'Kashmiri'},
{code: 'kk', language: 'Kazakh'},
{code: 'rw', language: 'Kinyarwanda'},
{code: 'kv', language: 'Komi'},
{code: 'kg', language: 'Kongo'},
{code: 'ko', language: 'Korean'},
{code: 'kj', language: 'Kwanyama, Kuanyama'},
{code: 'ku', language: 'Kurdish'},
{code: 'ky', language: 'Kyrgyz'},
{code: 'lo', language: 'Lao'},
{code: 'la', language: 'Latin'},
{code: 'lv', language: 'Latvian'},
{code: 'lb', language: 'Letzeburgesch, Luxembourgish'},
{code: 'li', language: 'Limburgish, Limburgan, Limburger'},
{code: 'ln', language: 'Lingala'},
{code: 'lt', language: 'Lithuanian'},
{code: 'lu', language: 'Luba-Katanga'},
{code: 'mk', language: 'Macedonian'},
{code: 'mg', language: 'Malagasy'},
{code: 'ms', language: 'Malay'},
{code: 'ml', language: 'Malayalam'},
{code: 'mt', language: 'Maltese'},
{code: 'gv', language: 'Manx'},
{code: 'mi', language: 'Maori'},
{code: 'mr', language: 'Marathi'},
{code: 'mh', language: 'Marshallese'},
{code: 'ro', language: 'Moldovan, Moldavian, Romanian'},
{code: 'mn', language: 'Mongolian'},
{code: 'na', language: 'Nauru'},
{code: 'nv', language: 'Navajo, Navaho'},
{code: 'nd', language: 'Northern Ndebele'},
{code: 'ng', language: 'Ndonga'},
{code: 'ne', language: 'Nepali'},
{code: 'se', language: 'Northern Sami'},
{code: 'no', language: 'Norwegian'},
{code: 'nb', language: 'Norwegian Bokmål'},
{code: 'nn', language: 'Norwegian Nynorsk'},
{code: 'ii', language: 'Nuosu, Sichuan Yi'},
{code: 'oc', language: 'Occitan (post 1500)'},
{code: 'oj', language: 'Ojibwa'},
{code: 'or', language: 'Oriya'},
{code: 'om', language: 'Oromo'},
{code: 'os', language: 'Ossetian, Ossetic'},
{code: 'pi', language: 'Pali'},
{code: 'pa', language: 'Panjabi, Punjabi'},
{code: 'ps', language: 'Pashto, Pushto'},
{code: 'fa', language: 'Persian'},
{code: 'pl', language: 'Polish'},
{code: 'pt', language: 'Portuguese'},
{code: 'qu', language: 'Quechua'},
{code: 'rm', language: 'Romansh'},
{code: 'rn', language: 'Rundi'},
{code: 'ru', language: 'Russian'},
{code: 'sm', language: 'Samoan'},
{code: 'sg', language: 'Sango'},
{code: 'sa', language: 'Sanskrit'},
{code: 'sc', language: 'Sardinian'},
{code: 'sr', language: 'Serbian'},
{code: 'sn', language: 'Shona'},
{code: 'sd', language: 'Sindhi'},
{code: 'si', language: 'Sinhala, Sinhalese'},
{code: 'sk', language: 'Slovak'},
{code: 'sl', language: 'Slovenian'},
{code: 'so', language: 'Somali'},
{code: 'st', language: 'Sotho, Southern'},
{code: 'nr', language: 'South Ndebele'},
{code: 'es', language: 'Spanish, Castilian'},
{code: 'su', language: 'Sundanese'},
{code: 'sw', language: 'Swahili'},
{code: 'ss', language: 'Swati'},
{code: 'sv', language: 'Swedish'},
{code: 'tl', language: 'Tagalog'},
{code: 'ty', language: 'Tahitian'},
{code: 'tg', language: 'Tajik'},
{code: 'ta', language: 'Tamil'},
{code: 'tt', language: 'Tatar'},
{code: 'te', language: 'Telugu'},
{code: 'th', language: 'Thai'},
{code: 'bo', language: 'Tibetan'},
{code: 'ti', language: 'Tigrinya'},
{code: 'to', language: 'Tonga (Tonga Islands)'},
{code: 'ts', language: 'Tsonga'},
{code: 'tn', language: 'Tswana'},
{code: 'tr', language: 'Turkish'},
{code: 'tk', language: 'Turkmen'},
{code: 'tw', language: 'Twi'},
{code: 'ug', language: 'Uighur, Uyghur'},
{code: 'uk', language: 'Ukrainian'},
{code: 'ur', language: 'Urdu'},
{code: 'uz', language: 'Uzbek'},
{code: 've', language: 'Venda'},
{code: 'vi', language: 'Vietnamese'},
{code: 'vo', language: 'Volap_k'},
{code: 'wa', language: 'Walloon'},
{code: 'cy', language: 'Welsh'},
{code: 'fy', language: 'Western Frisian'},
{code: 'wo', language: 'Wolof'},
{code: 'xh', language: 'Xhosa'},
{code: 'yi', language: 'Yiddish'},
{code: 'yo', language: 'Yoruba'},
{code: 'za', language: 'Zhuang, Chuang'},
{code: 'zu', language: 'Zulu'},
];
`
Typescript:
type TLanguage =
| 'ab'
| 'aa'
| 'af'
| 'ak'
| 'sq'
| 'am'
| 'ar'
| 'an'
| 'hy'
| 'as'
| 'av'
| 'ae'
| 'ay'
| 'az'
| 'bm'
| 'ba'
| 'eu'
| 'be'
| 'bn'
| 'bh'
| 'bi'
| 'bs'
| 'br'
| 'bg'
| 'my'
| 'ca'
| 'km'
| 'ch'
| 'ce'
| 'ny'
| 'zh'
| 'cu'
| 'cv'
| 'kw'
| 'co'
| 'cr'
| 'hr'
| 'cs'
| 'da'
| 'dv'
| 'nl'
| 'dz'
| 'en'
| 'eo'
| 'et'
| 'ee'
| 'fo'
| 'fj'
| 'fi'
| 'fr'
| 'ff'
| 'gd'
| 'gl'
| 'lg'
| 'ka'
| 'de'
| 'ki'
| 'el'
| 'kl'
| 'gn'
| 'gu'
| 'ht'
| 'ha'
| 'he'
| 'hz'
| 'hi'
| 'ho'
| 'hu'
| 'is'
| 'io'
| 'ig'
| 'id'
| 'ia'
| 'ie'
| 'iu'
| 'ik'
| 'ga'
| 'it'
| 'ja'
| 'jv'
| 'kn'
| 'kr'
| 'ks'
| 'kk'
| 'rw'
| 'kv'
| 'kg'
| 'ko'
| 'kj'
| 'ku'
| 'ky'
| 'lo'
| 'la'
| 'lv'
| 'lb'
| 'li'
| 'ln'
| 'lt'
| 'lu'
| 'mk'
| 'mg'
| 'ms'
| 'ml'
| 'mt'
| 'gv'
| 'mi'
| 'mr'
| 'mh'
| 'ro'
| 'mn'
| 'na'
| 'nv'
| 'nd'
| 'ng'
| 'ne'
| 'se'
| 'no'
| 'nb'
| 'nn'
| 'ii'
| 'oc'
| 'oj'
| 'or'
| 'om'
| 'os'
| 'pi'
| 'pa'
| 'ps'
| 'fa'
| 'pl'
| 'pt'
| 'qu'
| 'rm'
| 'rn'
| 'ru'
| 'sm'
| 'sg'
| 'sa'
| 'sc'
| 'sr'
| 'sn'
| 'sd'
| 'si'
| 'sk'
| 'sl'
| 'so'
| 'st'
| 'nr'
| 'es'
| 'su'
| 'sw'
| 'ss'
| 'sv'
| 'tl'
| 'ty'
| 'tg'
| 'ta'
| 'tt'
| 'te'
| 'th'
| 'bo'
| 'ti'
| 'to'
| 'ts'
| 'tn'
| 'tr'
| 'tk'
| 'tw'
| 'ug'
| 'uk'
| 'ur'
| 'uz'
| 've'
| 'vi'
| 'vo'
| 'wa'
| 'cy'
| 'fy'
| 'wo'
| 'xh'
| 'yi'
| 'yo'
| 'za'
| 'zu';
const LANGUAGES: Record<TLanguage, string> = {
ab: 'Abkhazian',
aa: 'Afar',
af: 'Afrikaans',
ak: 'Akan',
sq: 'Albanian',
am: 'Amharic',
ar: 'Arabic',
an: 'Aragonese',
hy: 'Armenian',
as: 'Assamese',
av: 'Avaric',
ae: 'Avestan',
ay: 'Aymara',
az: 'Azerbaijani',
bm: 'Bambara',
ba: 'Bashkir',
eu: 'Basque',
be: 'Belarusian',
bn: 'Bengali',
bh: 'Bihari languages',
bi: 'Bislama',
bs: 'Bosnian',
br: 'Breton',
bg: 'Bulgarian',
my: 'Burmese',
ca: 'Catalan, Valencian',
km: 'Central Khmer',
ch: 'Chamorro',
ce: 'Chechen',
ny: 'Chichewa, Chewa, Nyanja',
zh: 'Chinese',
cu: 'Church Slavonic, Old Bulgarian, Old Church Slavonic',
cv: 'Chuvash',
kw: 'Cornish',
co: 'Corsican',
cr: 'Cree',
hr: 'Croatian',
cs: 'Czech',
da: 'Danish',
dv: 'Divehi, Dhivehi, Maldivian',
nl: 'Dutch, Flemish',
dz: 'Dzongkha',
en: 'English',
eo: 'Esperanto',
et: 'Estonian',
ee: 'Ewe',
fo: 'Faroese',
fj: 'Fijian',
fi: 'Finnish',
fr: 'French',
ff: 'Fulah',
gd: 'Gaelic, Scottish Gaelic',
gl: 'Galician',
lg: 'Ganda',
ka: 'Georgian',
de: 'German',
ki: 'Gikuyu, Kikuyu',
el: 'Greek (Modern)',
kl: 'Greenlandic, Kalaallisut',
gn: 'Guarani',
gu: 'Gujarati',
ht: 'Haitian, Haitian Creole',
ha: 'Hausa',
he: 'Hebrew',
hz: 'Herero',
hi: 'Hindi',
ho: 'Hiri Motu',
hu: 'Hungarian',
is: 'Icelandic',
io: 'Ido',
ig: 'Igbo',
id: 'Indonesian',
ia: 'Interlingua (International Auxiliary Language Association)',
ie: 'Interlingue',
iu: 'Inuktitut',
ik: 'Inupiaq',
ga: 'Irish',
it: 'Italian',
ja: 'Japanese',
jv: 'Javanese',
kn: 'Kannada',
kr: 'Kanuri',
ks: 'Kashmiri',
kk: 'Kazakh',
rw: 'Kinyarwanda',
kv: 'Komi',
kg: 'Kongo',
ko: 'Korean',
kj: 'Kwanyama, Kuanyama',
ku: 'Kurdish',
ky: 'Kyrgyz',
lo: 'Lao',
la: 'Latin',
lv: 'Latvian',
lb: 'Letzeburgesch, Luxembourgish',
li: 'Limburgish, Limburgan, Limburger',
ln: 'Lingala',
lt: 'Lithuanian',
lu: 'Luba-Katanga',
mk: 'Macedonian',
mg: 'Malagasy',
ms: 'Malay',
ml: 'Malayalam',
mt: 'Maltese',
gv: 'Manx',
mi: 'Maori',
mr: 'Marathi',
mh: 'Marshallese',
ro: 'Moldovan, Moldavian, Romanian',
mn: 'Mongolian',
na: 'Nauru',
nv: 'Navajo, Navaho',
nd: 'Northern Ndebele',
ng: 'Ndonga',
ne: 'Nepali',
se: 'Northern Sami',
no: 'Norwegian',
nb: 'Norwegian Bokmål',
nn: 'Norwegian Nynorsk',
ii: 'Nuosu, Sichuan Yi',
oc: 'Occitan (post 1500)',
oj: 'Ojibwa',
or: 'Oriya',
om: 'Oromo',
os: 'Ossetian, Ossetic',
pi: 'Pali',
pa: 'Panjabi, Punjabi',
ps: 'Pashto, Pushto',
fa: 'Persian',
pl: 'Polish',
pt: 'Portuguese',
qu: 'Quechua',
rm: 'Romansh',
rn: 'Rundi',
ru: 'Russian',
sm: 'Samoan',
sg: 'Sango',
sa: 'Sanskrit',
sc: 'Sardinian',
sr: 'Serbian',
sn: 'Shona',
sd: 'Sindhi',
si: 'Sinhala, Sinhalese',
sk: 'Slovak',
sl: 'Slovenian',
so: 'Somali',
st: 'Sotho, Southern',
nr: 'South Ndebele',
es: 'Spanish, Castilian',
su: 'Sundanese',
sw: 'Swahili',
ss: 'Swati',
sv: 'Swedish',
tl: 'Tagalog',
ty: 'Tahitian',
tg: 'Tajik',
ta: 'Tamil',
tt: 'Tatar',
te: 'Telugu',
th: 'Thai',
bo: 'Tibetan',
ti: 'Tigrinya',
to: 'Tonga (Tonga Islands)',
ts: 'Tsonga',
tn: 'Tswana',
tr: 'Turkish',
tk: 'Turkmen',
tw: 'Twi',
ug: 'Uighur, Uyghur',
uk: 'Ukrainian',
ur: 'Urdu',
uz: 'Uzbek',
ve: 'Venda',
vi: 'Vietnamese',
vo: 'Volap_k',
wa: 'Walloon',
cy: 'Welsh',
fy: 'Western Frisian',
wo: 'Wolof',
xh: 'Xhosa',
yi: 'Yiddish',
yo: 'Yoruba',
za: 'Zhuang, Chuang',
zu: 'Zulu',
};
One line for Javascript:
const LANGUAGES = [ 'ab' , 'aa' , 'af' , 'ak' , 'sq' , 'am' , 'ar' , 'an' , 'hy' , 'as' , 'av' , 'ae' , 'ay' , 'az' , 'bm' , 'ba' , 'eu' , 'be' , 'bn' , 'bh' , 'bi' , 'bs' , 'br' , 'bg' , 'my' , 'ca' , 'km' , 'ch' , 'ce' , 'ny' , 'zh' , 'cu' , 'cv' , 'kw' , 'co' , 'cr' , 'hr' , 'cs' , 'da' , 'dv' , 'nl' , 'dz' , 'en' , 'eo' , 'et' , 'ee' , 'fo' , 'fj' , 'fi' , 'fr' , 'ff' , 'gd' , 'gl' , 'lg' , 'ka' , 'de' , 'ki' , 'el' , 'kl' , 'gn' , 'gu' , 'ht' , 'ha' , 'he' , 'hz' , 'hi' , 'ho' , 'hu' , 'is' , 'io' , 'ig' , 'id' , 'ia' , 'ie' , 'iu' , 'ik' , 'ga' , 'it' , 'ja' , 'jv' , 'kn' , 'kr' , 'ks' , 'kk' , 'rw' , 'kv' , 'kg' , 'ko' , 'kj' , 'ku' , 'ky' , 'lo' , 'la' , 'lv' , 'lb' , 'li' , 'ln' , 'lt' , 'lu' , 'mk' , 'mg' , 'ms' , 'ml' , 'mt' , 'gv' , 'mi' , 'mr' , 'mh' , 'ro' , 'mn' , 'na' , 'nv' , 'nd' , 'ng' , 'ne' , 'se' , 'no' , 'nb' , 'nn' , 'ii' , 'oc' , 'oj' , 'or' , 'om' , 'os' , 'pi' , 'pa' , 'ps' , 'fa' , 'pl' , 'pt' , 'qu' , 'rm' , 'rn' , 'ru' , 'sm' , 'sg' , 'sa' , 'sc' , 'sr' , 'sn' , 'sd' , 'si' , 'sk' , 'sl' , 'so' , 'st' , 'nr' , 'es' , 'su' , 'sw' , 'ss' , 'sv' , 'tl' , 'ty' , 'tg' , 'ta' , 'tt' , 'te' , 'th' , 'bo' , 'ti' , 'to' , 'ts' , 'tn' , 'tr' , 'tk' , 'tw' , 'ug' , 'uk' , 'ur' , 'uz' , 've' , 'vi' , 'vo' , 'wa' , 'cy' , 'fy' , 'wo' , 'xh' , 'yi' , 'yo' , 'za' , 'zu'];
One Line for PHP:
$languages = [ 'ab' , 'aa' , 'af' , 'ak' , 'sq' , 'am' , 'ar' , 'an' , 'hy' , 'as' , 'av' , 'ae' , 'ay' , 'az' , 'bm' , 'ba' , 'eu' , 'be' , 'bn' , 'bh' , 'bi' , 'bs' , 'br' , 'bg' , 'my' , 'ca' , 'km' , 'ch' , 'ce' , 'ny' , 'zh' , 'cu' , 'cv' , 'kw' , 'co' , 'cr' , 'hr' , 'cs' , 'da' , 'dv' , 'nl' , 'dz' , 'en' , 'eo' , 'et' , 'ee' , 'fo' , 'fj' , 'fi' , 'fr' , 'ff' , 'gd' , 'gl' , 'lg' , 'ka' , 'de' , 'ki' , 'el' , 'kl' , 'gn' , 'gu' , 'ht' , 'ha' , 'he' , 'hz' , 'hi' , 'ho' , 'hu' , 'is' , 'io' , 'ig' , 'id' , 'ia' , 'ie' , 'iu' , 'ik' , 'ga' , 'it' , 'ja' , 'jv' , 'kn' , 'kr' , 'ks' , 'kk' , 'rw' , 'kv' , 'kg' , 'ko' , 'kj' , 'ku' , 'ky' , 'lo' , 'la' , 'lv' , 'lb' , 'li' , 'ln' , 'lt' , 'lu' , 'mk' , 'mg' , 'ms' , 'ml' , 'mt' , 'gv' , 'mi' , 'mr' , 'mh' , 'ro' , 'mn' , 'na' , 'nv' , 'nd' , 'ng' , 'ne' , 'se' , 'no' , 'nb' , 'nn' , 'ii' , 'oc' , 'oj' , 'or' , 'om' , 'os' , 'pi' , 'pa' , 'ps' , 'fa' , 'pl' , 'pt' , 'qu' , 'rm' , 'rn' , 'ru' , 'sm' , 'sg' , 'sa' , 'sc' , 'sr' , 'sn' , 'sd' , 'si' , 'sk' , 'sl' , 'so' , 'st' , 'nr' , 'es' , 'su' , 'sw' , 'ss' , 'sv' , 'tl' , 'ty' , 'tg' , 'ta' , 'tt' , 'te' , 'th' , 'bo' , 'ti' , 'to' , 'ts' , 'tn' , 'tr' , 'tk' , 'tw' , 'ug' , 'uk' , 'ur' , 'uz' , 've' , 'vi' , 'vo' , 'wa' , 'cy' , 'fy' , 'wo' , 'xh' , 'yi' , 'yo' , 'za' , 'zu'];
In French and with PHP :
$languages = [
'Abkhaze' => 'ab',
'Afar' => 'aa',
'Afrikaans' => 'af',
'Akan' => 'ak',
'Albanais' => 'sq',
'Amharique' => 'am',
'Arabe' => 'ar',
'Aragonais' => 'an',
'Arménien' => 'hy',
'Assamais' => 'as',
'Avar' => 'av',
'Avestique' => 'ae',
'Aymara' => 'ay',
'Azéri' => 'az',
'Bambara' => 'bm',
'Bachkir' => 'ba',
'Basque' => 'eu',
'Biélorusse' => 'be',
'Bengali' => 'bn',
'Bihari' => 'bh',
'Bichlamar' => 'bi',
'Bosniaque' => 'bs',
'Breton' => 'br',
'Bulgare' => 'bg',
'Birman' => 'my',
'Catalan, Valencien' => 'ca',
'Khmer Central' => 'km',
'Chamorro' => 'ch',
'Tchétchène' => 'ce',
'Chichewa, Nyanja' => 'ny',
'Chinois' => 'zh',
'Slavon d’église, Vieux bulgare, Slavon d’église ancien' => 'cu',
'Tchouvache' => 'cv',
'Cornique' => 'kw',
'Corse' => 'co',
'Cris' => 'cr',
'Croate' => 'hr',
'Tchèque' => 'cs',
'Danois' => 'da',
'Maldivien, Divehi' => 'dv',
'Néerlandais, Flamand' => 'nl',
'Dzongkha' => 'dz',
'Anglais' => 'en',
'Espéranto' => 'eo',
'Estonien' => 'et',
'Éwé' => 'ee',
'Féroïen' => 'fo',
'Fidjien' => 'fj',
'Finnois' => 'fi',
'Français' => 'fr',
'Fulfulde' => 'ff',
'Gaélique, Gaélique écossais' => 'gd',
'Galicien' => 'gl',
'Ganda' => 'lg',
'Géorgien' => 'ka',
'Allemand' => 'de',
'Kikuyu, Gikuyu' => 'ki',
'Grec (Moderne)' => 'el',
'Groenlandais, Kalaallisut' => 'kl',
'Guarani' => 'gn',
'Gujarati' => 'gu',
'Haïtien, Créole haïtien' => 'ht',
'Haoussa' => 'ha',
'Hébreu' => 'he',
'Herero' => 'hz',
'Hindi' => 'hi',
'Hiri Motu' => 'ho',
'Hongrois' => 'hu',
'Islandais' => 'is',
'Ido' => 'io',
'Igbo' => 'ig',
'Indonésien' => 'id',
'Interlingua (Association internationale de la langue auxiliaire)' => 'ia',
'Interlingue' => 'ie',
'Inuktitut' => 'iu',
'Inupiaq' => 'ik',
'Irlandais' => 'ga',
'Italien' => 'it',
'Japonais' => 'ja',
'Javanais' => 'jv',
'Kannada' => 'kn',
'Kanouri' => 'kr',
'Kashmiri' => 'ks',
'Kazakh' => 'kk',
'Kinyarwanda' => 'rw',
'Komi' => 'kv',
'Kongo' => 'kg',
'Coréen' => 'ko',
'Kwanyama, Kuanyama' => 'kj',
'Kurde' => 'ku',
'Kirghiz' => 'ky',
'Lao' => 'lo',
'Latin' => 'la',
'Letton' => 'lv',
'Luxembourgeois' => 'lb',
'Limbourgeois, Limburgan, Limburger' => 'li',
'Lingala' => 'ln',
'Lituanien' => 'lt',
'Luba-Katanga' => 'lu',
'Macédonien' => 'mk',
'Malgache' => 'mg',
'Malais' => 'ms',
'Malayalam' => 'ml',
'Maltais' => 'mt',
'Manx' => 'gv',
'Maori' => 'mi',
'Marathi' => 'mr',
'Marshallais' => 'mh',
'Moldave, Moldovan, Roumain' => 'ro',
'Mongol' => 'mn',
'Nauruan' => 'na',
'Navajo, Navaho' => 'nv',
'Nord-ndebele' => 'nd',
'Ndonga' => 'ng',
'Népalais' => 'ne',
'Sami du Nord' => 'se',
'Norvégien' => 'no',
'Norvégien bokmål' => 'nb',
'Norvégien nynorsk' => 'nn',
'Yi de Sichuan' => 'ii',
'Occitan (après 1500)' => 'oc',
'Ojibwa' => 'oj',
'Oriya' => 'or',
'Oromo' => 'om',
'Ossète, Ossetique' => 'os',
'Pali' => 'pi',
'Pendjabi, Pendjabi occidental' => 'pa',
'Pachto, Pushto' => 'ps',
'Persan' => 'fa',
'Polonais' => 'pl',
'Portugais' => 'pt',
'Quechua' => 'qu',
'Romanche' => 'rm',
'Kirundi' => 'rn',
'Russe' => 'ru',
'Samoan' => 'sm',
'Sango' => 'sg',
'Sanskrit' => 'sa',
'Sarde' => 'sc',
'Serbe' => 'sr',
'Shona' => 'sn',
'Sindhi' => 'sd',
'Sinhala, Cingalais' => 'si',
'Slovaque' => 'sk',
'Slovène' => 'sl',
'Somali' => 'so',
'Sotho du Sud' => 'st',
'Ndebele du Sud' => 'nr',
'Espagnol, Castillan' => 'es',
'Soundanais' => 'su',
'Swahili' => 'sw',
'Swati' => 'ss',
'Suédois' => 'sv',
'Tagalog' => 'tl',
'Tahitien' => 'ty',
'Tadjik' => 'tg',
'Tamoul' => 'ta',
'Tatar' => 'tt',
'Télougou' => 'te',
'Thaï' => 'th',
'Tibétain' => 'bo',
'Tigrigna' => 'ti',
'Tonga (Îles Tonga)' => 'to',
'Tsonga' => 'ts',
'Tswana' => 'tn',
'Turc' => 'tr',
'Turkmène' => 'tk',
'Twi' => 'tw',
'Ouïghour, Ouïgour' => 'ug',
'Ukrainien' => 'uk',
'Ourdou' => 'ur',
'Ouzbek' => 'uz',
'Venda' => 've',
'Vietnamien' => 'vi',
'Volapük' => 'vo',
'Wallon' => 'wa',
'Gallois' => 'cy',
'Frison occidental' => 'fy',
'Wolof' => 'wo',
'Xhosa' => 'xh',
'Yiddish' => 'yi',
'Yoruba' => 'yo',
'Zhuang, Chuang' => 'za',
'Zoulou' => 'zu'
];
In French and TS
export type ISO6391Code = keyof typeof ISO_639_1_LANG_FR;
export const ISO_639_1_LANG_FR = {
'ab': 'Abkhaze',
'aa': 'Afar',
'af': 'Afrikaans',
'ak': 'Akan',
'sq': 'Albanais',
'am': 'Amharique',
'ar': 'Arabe',
'an': 'Aragonais',
'hy': 'Arménien',
'as': 'Assamais',
'av': 'Avar',
'ae': 'Avestique',
'ay': 'Aymara',
'az': 'Azéri',
'bm': 'Bambara',
'ba': 'Bachkir',
'eu': 'Basque',
'be': 'Biélorusse',
'bn': 'Bengali',
'bh': 'Bihari',
'bi': 'Bichlamar',
'bs': 'Bosniaque',
'br': 'Breton',
'bg': 'Bulgare',
'my': 'Birman',
'ca': 'Catalan, Valencien',
'km': 'Khmer Central',
'ch': 'Chamorro',
'ce': 'Tchétchène',
'ny': 'Chichewa, Nyanja',
'zh': 'Chinois',
'cu': 'Slavon d’église, Vieux bulgare, Slavon d’église ancien',
'cv': 'Tchouvache',
'kw': 'Cornique',
'co': 'Corse',
'cr': 'Cris',
'hr': 'Croate',
'cs': 'Tchèque',
'da': 'Danois',
'dv': 'Maldivien, Divehi',
'nl': 'Néerlandais, Flamand',
'dz': 'Dzongkha',
'en': 'Anglais',
'eo': 'Espéranto',
'et': 'Estonien',
'ee': 'Éwé',
'fo': 'Féroïen',
'fj': 'Fidjien',
'fi': 'Finnois',
'fr': 'Français',
'ff': 'Fulfulde',
'gd': 'Gaélique, Gaélique écossais',
'gl': 'Galicien',
'lg': 'Ganda',
'ka': 'Géorgien',
'de': 'Allemand',
'ki': 'Kikuyu, Gikuyu',
'el': 'Grec (Moderne)',
'kl': 'Groenlandais, Kalaallisut',
'gn': 'Guarani',
'gu': 'Gujarati',
'ht': 'Haïtien, Créole haïtien',
'ha': 'Haoussa',
'he': 'Hébreu',
'hz': 'Herero',
'hi': 'Hindi',
'ho': 'Hiri Motu',
'hu': 'Hongrois',
'is': 'Islandais',
'io': 'Ido',
'ig': 'Igbo',
'id': 'Indonésien',
'ia': 'Interlingua (Association internationale de la langue auxiliaire)',
'ie': 'Interlingue',
'iu': 'Inuktitut',
'ik': 'Inupiaq',
'ga': 'Irlandais',
'it': 'Italien',
'ja': 'Japonais',
'jv': 'Javanais',
'kn': 'Kannada',
'kr': 'Kanouri',
'ks': 'Kashmiri',
'kk': 'Kazakh',
'rw': 'Kinyarwanda',
'kv': 'Komi',
'kg': 'Kongo',
'ko': 'Coréen',
'kj': 'Kwanyama, Kuanyama',
'ku': 'Kurde',
'ky': 'Kirghiz',
'lo': 'Lao',
'la': 'Latin',
'lv': 'Letton',
'lb': 'Luxembourgeois',
'li': 'Limbourgeois, Limburgan, Limburger',
'ln': 'Lingala',
'lt': 'Lituanien',
'lu': 'Luba-Katanga',
'mk': 'Macédonien',
'mg': 'Malgache',
'ms': 'Malais',
'ml': 'Malayalam',
'mt': 'Maltais',
'gv': 'Manx',
'mi': 'Maori',
'mr': 'Marathi',
'mh': 'Marshallais',
'ro': 'Moldave, Moldovan, Roumain',
'mn': 'Mongol',
'na': 'Nauruan',
'nv': 'Navajo, Navaho',
'nd': 'Nord-ndebele',
'ng': 'Ndonga',
'ne': 'Népalais',
'se': 'Sami du Nord',
'no': 'Norvégien',
'nb': 'Norvégien bokmål',
'nn': 'Norvégien nynorsk',
'ii': 'Yi de Sichuan',
'oc': 'Occitan (après 1500)',
'oj': 'Ojibwa',
'or': 'Oriya',
'om': 'Oromo',
'os': 'Ossète, Ossetique',
'pi': 'Pali',
'pa': 'Pendjabi, Pendjabi occidental',
'ps': 'Pachto, Pushto',
'fa': 'Persan',
'pl': 'Polonais',
'pt': 'Portugais',
'qu': 'Quechua',
'rm': 'Romanche',
'rn': 'Kirundi',
'ru': 'Russe',
'sm': 'Samoan',
'sg': 'Sango',
'sa': 'Sanskrit',
'sc': 'Sarde',
'sr': 'Serbe',
'sn': 'Shona',
'sd': 'Sindhi',
'si': 'Sinhala, Cingalais',
'sk': 'Slovaque',
'sl': 'Slovène',
'so': 'Somali',
'st': 'Sotho du Sud',
'nr': 'Ndebele du Sud',
'es': 'Espagnol, Castillan',
'su': 'Soundanais',
'sw': 'Swahili',
'ss': 'Swati',
'sv': 'Suédois',
'tl': 'Tagalog',
'ty': 'Tahitien',
'tg': 'Tadjik',
'ta': 'Tamoul',
'tt': 'Tatar',
'te': 'Télougou',
'th': 'Thaï',
'bo': 'Tibétain',
'ti': 'Tigrigna',
'to': 'Tonga (Îles Tonga)',
'ts': 'Tsonga',
'tn': 'Tswana',
'tr': 'Turc',
'tk': 'Turkmène',
'tw': 'Twi',
'ug': 'Ouïghour, Ouïgour',
'uk': 'Ukrainien',
'ur': 'Ourdou',
'uz': 'Ouzbek',
've': 'Venda',
'vi': 'Vietnamien',
'vo': 'Volapük',
'wa': 'Wallon',
'cy': 'Gallois',
'fy': 'Frison occidental',
'wo': 'Wolof',
'xh': 'Xhosa',
'yi': 'Yiddish',
'yo': 'Yoruba',
'za': 'Zhuang, Chuang',
'zu': 'Zoulou',
};
javascript version here