## Taken from LetsMT-repository and adjusted for OPUS::Tools
## WARNING: Auto-generated file, do not edit by hand! ##

package OPUS::Tools::ISO639;

use Exporter 'import';
our @EXPORT = qw(
    iso639_TwoToThree 
    iso639_ThreeToTwo 
    iso639_ThreeToName 
    iso639_exists 
    iso639_AnyToTwo 
    iso639_AnyToLangTag 
    iso639_DefaultRegion
    iso639_NameToThree
    iso639_NameToTwo
);
%EXPORT_TAGS = ( all => \@EXPORT );
$ThreeToTwo = {
                'fra' => 'fr',
                'som' => 'so',
                'ido' => 'io',
                'mal' => 'ml',
                'uzb' => 'uz',
                'ukr' => 'uk',
                'cha' => 'ch',
                'kon' => 'kg',
                'ava' => 'av',
                'epo' => 'eo',
                'hat' => 'ht',
                'ven' => 've',
                'tel' => 'te',
                'rus' => 'ru',
                'ita' => 'it',
                'cre' => 'cr',
                'pol' => 'pl',
                'eus' => 'eu',
                'mac' => 'mk',
                'kor' => 'ko',
                'nya' => 'ny',
                'geo' => 'ka',
                'bur' => 'my',
                '(none)' => '(none)',
                'bam' => 'bm',
                'kin' => 'rw',
                'tur' => 'tr',
                'wol' => 'wo',
                'ewe' => 'ee',
                'hye' => 'hy',
                'est' => 'et',
                'sun' => 'su',
                'slk' => 'sk',
                'mri' => 'mi',
                'ndo' => 'ng',
                'swe' => 'sv',
                'pan' => 'pa',
                'nep' => 'ne',
                'chi' => 'zh',
                'lug' => 'lg',
                'lim' => 'li',
                'aym' => 'ay',
                'nor' => 'no',
                'abk' => 'ab',
                'rum' => 'ro',
                'dzo' => 'dz',
                'por' => 'pt',
                'ind' => 'id',
                'ara' => 'ar',
                'bul' => 'bg',
                'nbl' => 'nr',
                'asm' => 'as',
                'bre' => 'br',
                'snd' => 'sd',
                'iii' => 'ii',
                'bod' => 'bo',
                'roh' => 'rm',
                'ful' => 'ff',
                'oci' => 'oc',
                'tuk' => 'tk',
                'ssw' => 'ss',
                'xho' => 'xh',
                'uig' => 'ug',
                'arg' => 'an',
                'xxx' => 'xx',
                'sot' => 'st',
                'wln' => 'wa',
                'isl' => 'is',
                'fin' => 'fi',
                'nav' => 'nv',
                'sag' => 'sg',
                'ces' => 'cs',
                'may' => 'ms',
                'cor' => 'kw',
                'sin' => 'si',
                'ori' => 'or',
                'lao' => 'lo',
                'ave' => 'ae',
                'que' => 'qu',
                'khm' => 'km',
                'ice' => 'is',
                'aar' => 'aa',
                'nob' => 'nb',
                'san' => 'sa',
                'div' => 'dv',
                'lub' => 'lu',
                'kat' => 'ka',
                'lat' => 'la',
                'ron' => 'ro',
                'aze' => 'az',
                'hrv' => 'hr',
                'nld' => 'nl',
                'run' => 'rn',
                'bak' => 'ba',
                'mon' => 'mn',
                'ben' => 'bn',
                'lin' => 'ln',
                'oss' => 'os',
                'smo' => 'sm',
                'kal' => 'kl',
                'kur' => 'ku',
                'ile' => 'ie',
                'tat' => 'tt',
                'glv' => 'gv',
                'chi_cn' => 'zh_CN',
                'guj' => 'gu',
                'tsn' => 'tn',
                'jav' => 'jv',
                'yid' => 'yi',
                'gla' => 'gd',
                'arm' => 'hy',
                'cze' => 'cs',
                'grn' => 'gn',
                'chi_tw' => 'zh_TW',
                'srp' => 'sr',
                'ltz' => 'lb',
                'pus' => 'ps',
                'kan' => 'kn',
                'kir' => 'ky',
                'bel' => 'be',
                'sna' => 'sn',
                'mya' => 'my',
                'tir' => 'ti',
                'chv' => 'cv',
                'ell' => 'el',
                'lav' => 'lv',
                'fij' => 'fj',
                'mlt' => 'mt',
                'cat' => 'ca',
                'baq' => 'eu',
                'pli' => 'pi',
                'fas' => 'fa',
                'deu' => 'de',
                'lit' => 'lt',
                'her' => 'hz',
                'vol' => 'vo',
                'kom' => 'kv',
                'tso' => 'ts',
                'tgk' => 'tg',
                'gle' => 'ga',
                'hin' => 'hi',
                'kaz' => 'kk',
                'wel' => 'cy',
                'urd' => 'ur',
                'mao' => 'mi',
                'kik' => 'ki',
                'vie' => 'vi',
                'ger' => 'de',
                'slv' => 'sl',
                'ton' => 'to',
                'tgl' => 'tl',
                'dan' => 'da',
                'orm' => 'om',
                'fre' => 'fr',
                'bis' => 'bi',
                'gre' => 'el',
                'srd' => 'sc',
                'glg' => 'gl',
                'zha' => 'za',
                'zho' => 'zh',
                'hau' => 'ha',
                'yor' => 'yo',
                'mar' => 'mr',
                'dut' => 'nl',
                'bih' => 'bh',
                'per' => 'fa',
                'afr' => 'af',
                'mah' => 'mh',
                'eng' => 'en',
                'sqi' => 'sq',
                'tib' => 'bo',
                'heb' => 'he',
                'ipk' => 'ik',
                'oji' => 'oj',
                'fao' => 'fo',
                'iku' => 'iu',
                'nno' => 'nn',
                'amh' => 'am',
                'tam' => 'ta',
                'nde' => 'nd',
                'hun' => 'hu',
                'ibo' => 'ig',
                'NULL' => '(none)',
                'sme' => 'se',
                'chu' => 'cu',
                'alb' => 'sq',
                'twi' => 'tw',
                'cos' => 'co',
                'slo' => 'sk',
                'nau' => 'na',
                'pob' => 'pt_BR',
                'fry' => 'fy',
                'mkd' => 'mk',
                'zul' => 'zu',
                'kua' => 'kj',
                'cym' => 'cy',
                'tha' => 'th',
                'jpn' => 'ja',
                'che' => 'ce',
                'swa' => 'sw',
                'spa' => 'es',
                'bos' => 'bs',
                'kas' => 'ks',
                'mlg' => 'mg',
                'kau' => 'kr',
                'msa' => 'ms',
                'ina' => 'ia',
                'tah' => 'ty',
                'aka' => 'ak',
                'hmo' => 'ho'
              };
$TwoToThree = {
                'ne' => 'nep',
                'tr' => 'tur',
                'ki' => 'kik',
                'da' => 'dan',
                'ug' => 'uig',
                'gl' => 'glg',
                'my' => 'bur',
                'xx' => 'xxx',
                'ro' => 'rum',
                'tn' => 'tsn',
                'ta' => 'tam',
                'co' => 'cos',
                'rw' => 'kin',
                'br' => 'bre',
                '(none)' => '(none)',
                'cy' => 'wel',
                'bo' => 'tib',
                'st' => 'sot',
                'ko' => 'kor',
                'ak' => 'aka',
                'cs' => 'cze',
                'ps' => 'pus',
                'km' => 'khm',
                'av' => 'ava',
                'af' => 'afr',
                'is' => 'ice',
                'qu' => 'que',
                'ti' => 'tir',
                'mt' => 'mlt',
                'ky' => 'kir',
                'la' => 'lat',
                'ga' => 'gle',
                'hy' => 'arm',
                'ms' => 'may',
                'bh' => 'bih',
                'ka' => 'geo',
                'oc' => 'oci',
                'mi' => 'mao',
                'sv' => 'swe',
                'it' => 'ita',
                'hu' => 'hun',
                'za' => 'zha',
                'fa' => 'per',
                'ng' => 'ndo',
                'dv' => 'div',
                'zh_TW' => 'chi_tw',
                'se' => 'sme',
                'lu' => 'lub',
                'kv' => 'kom',
                'jv' => 'jav',
                've' => 'ven',
                'na' => 'nau',
                'pt' => 'por',
                'ks' => 'kas',
                'hi' => 'hin',
                'mh' => 'mah',
                'ba' => 'bak',
                'kg' => 'kon',
                'no' => 'nor',
                'lv' => 'lav',
                'os' => 'oss',
                'ho' => 'hmo',
                'ln' => 'lin',
                'fr' => 'fre',
                'id' => 'ind',
                'sr' => 'srp',
                'si' => 'sin',
                'vo' => 'vol',
                'ff' => 'ful',
                'om' => 'orm',
                'ab' => 'abk',
                'fi' => 'fin',
                'fj' => 'fij',
                'wo' => 'wol',
                'sn' => 'sna',
                'li' => 'lim',
                'sd' => 'snd',
                'yi' => 'yid',
                'ii' => 'iii',
                'gv' => 'glv',
                'ha' => 'hau',
                'lg' => 'lug',
                'pa' => 'pan',
                'sl' => 'slv',
                'am' => 'amh',
                'mr' => 'mar',
                'bi' => 'bis',
                'ee' => 'ewe',
                'kj' => 'kua',
                'rm' => 'roh',
                'dz' => 'dzo',
                'kn' => 'kan',
                'rn' => 'run',
                'eo' => 'epo',
                'fy' => 'fry',
                'mn' => 'mon',
                'ik' => 'ipk',
                'nv' => 'nav',
                'gd' => 'gla',
                'as' => 'asm',
                'ae' => 'ave',
                'tk' => 'tuk',
                'mg' => 'mlg',
                'su' => 'sun',
                'sc' => 'srd',
                'ru' => 'rus',
                'ia' => 'ina',
                'nb' => 'nob',
                'cr' => 'cre',
                'ku' => 'kur',
                'vi' => 'vie',
                'az' => 'aze',
                'lo' => 'lao',
                'sg' => 'sag',
                'bm' => 'bam',
                'aa' => 'aar',
                'lb' => 'ltz',
                'nr' => 'nbl',
                'ts' => 'tso',
                'kw' => 'cor',
                'ml' => 'mal',
                'zh_CN' => 'chi_cn',
                'uz' => 'uzb',
                'ht' => 'hat',
                'kl' => 'kal',
                'bs' => 'bos',
                'iu' => 'iku',
                'yo' => 'yor',
                'to' => 'ton',
                'cu' => 'chu',
                'ch' => 'cha',
                'eu' => 'baq',
                'wa' => 'wln',
                'bg' => 'bul',
                'gu' => 'guj',
                'pl' => 'pol',
                'ca' => 'cat',
                'sq' => 'alb',
                'ay' => 'aym',
                'sk' => 'slo',
                'oj' => 'oji',
                'ty' => 'tah',
                'an' => 'arg',
                'uk' => 'ukr',
                'es' => 'spa',
                'sw' => 'swa',
                'kr' => 'kau',
                'tt' => 'tat',
                'fo' => 'fao',
                'ss' => 'ssw',
                'or' => 'ori',
                'sa' => 'san',
                'xh' => 'xho',
                'io' => 'ido',
                'th' => 'tha',
                'so' => 'som',
                'et' => 'est',
                'ie' => 'ile',
                'tl' => 'tgl',
                'nd' => 'nde',
                'mk' => 'mac',
                'en' => 'eng',
                'lt' => 'lit',
                'hr' => 'hrv',
                'gn' => 'grn',
                'de' => 'ger',
                'be' => 'bel',
                'zu' => 'zul',
                'ur' => 'urd',
                'cv' => 'chv',
                'tw' => 'twi',
                'hz' => 'her',
                'ce' => 'che',
                'nn' => 'nno',
                'bn' => 'ben',
                'ja' => 'jpn',
                'tg' => 'tgk',
                'pi' => 'pli',
                'te' => 'tel',
                'he' => 'heb',
                'zh' => 'chi',
                'ig' => 'ibo',
                'sm' => 'smo',
                'nl' => 'dut',
                'ar' => 'ara',
                'ny' => 'nya',
                'el' => 'gre',
                'kk' => 'kaz',
                'pt_BR' => 'pob'
              };
$ThreeToName = {
                 'sid' => 'Sidamo',
                 'fra' => 'French',
                 'gor' => 'Gorontalo',
                 'elx' => 'Elamite',
                 'tlh' => 'Klingon',
                 'uzb' => 'Uzbek',
                 'ukr' => 'Ukrainian',
                 'sog' => 'Sogdian',
                 'ava' => 'Avaric',
                 'lun' => 'Lunda',
                 'kum' => 'Kumyk',
                 'krc' => 'Karachay-Balkar',
                 'epo' => 'Esperanto',
                 'hat' => 'Haitian',
                 'fat' => 'Fanti',
                 'tel' => 'Telugu',
                 'mno' => 'Manobo languages',
                 'ita' => 'Italian',
                 'kor' => 'Korean',
                 'bnt' => 'Bantu languages',
                 'bas' => 'Basa',
                 'nya' => 'Chichewa',
                 'geo' => 'Georgian',
                 'bur' => 'Burmese',
                 '(none)' => 'Serbo-Croatian',
                 'lam' => 'Lamba',
                 'bam' => 'Bambara',
                 'mwl' => 'Mirandese',
                 'kin' => 'Kinyarwanda',
                 'tur' => 'Turkish',
                 'syc' => 'Classical Syriac',
                 'ewe' => 'Ewe',
                 'hye' => 'Armenian',
                 'slk' => 'Slovak',
                 'gil' => 'Gilbertese',
                 'frm' => 'French, Middle (ca.1400-1600)',
                 'sux' => 'Sumerian',
                 'kut' => 'Kutenai',
                 'ndo' => 'Ndonga',
                 'swe' => 'Swedish',
                 'tai' => 'Tai languages',
                 'chi' => 'Chinese',
                 'mun' => 'Munda languages',
                 'lug' => 'Ganda',
                 'lim' => 'Limburgan',
                 'rar' => 'Rarotongan',
                 'hsb' => 'Upper Sorbian',
                 'aym' => 'Aymara',
                 'nor' => 'Norwegian',
                 'ada' => 'Adangme',
                 'abk' => 'Abkhazian',
                 'iro' => 'Iroquoian languages',
                 'dak' => 'Dakota',
                 'arn' => 'Mapudungun',
                 'dzo' => 'Dzongkha',
                 'sal' => 'Salishan languages',
                 'und' => 'Undetermined',
                 'por' => 'Portuguese',
                 'ind' => 'Indonesian',
                 'mkh' => 'Mon-Khmer languages',
                 'pau' => 'Palauan',
                 'byn' => 'Blin',
                 'asm' => 'Assamese',
                 'wal' => 'Wolaitta',
                 'afh' => 'Afrihili',
                 'ssa' => 'Nilo-Saharan languages',
                 'snd' => 'Sindhi',
                 'man' => 'Mandingo',
                 'iii' => 'Sichuan Yi',
                 'dyu' => 'Dyula',
                 'mic' => 'Mi\'kmaq',
                 'cmc' => 'Chamic languages',
                 'oci' => 'Occitan (post 1500)',
                 'tuk' => 'Turkmen',
                 'ssw' => 'Swati',
                 'son' => 'Songhai languages',
                 'xho' => 'Xhosa',
                 'bin' => 'Bini',
                 'sco' => 'Scots',
                 'arg' => 'Aragonese',
                 'xxx' => 'unknown',
                 'pra' => 'Prakrit languages',
                 'sot' => 'Sotho, Southern',
                 'isl' => 'Icelandic',
                 'rom' => 'Romany',
                 'arc' => 'Official Aramaic (700-300 BCE)',
                 'sag' => 'Sango',
                 'mas' => 'Masai',
                 'kac' => 'Kachin',
                 'may' => 'Malay',
                 'cor' => 'Cornish',
                 'roa' => 'Romance languages',
                 'chm' => 'Mari',
                 'mai' => 'Maithili',
                 'lao' => 'Lao',
                 'que' => 'Quechua',
                 'khm' => 'Central Khmer',
                 'kpe' => 'Kpelle',
                 'jpr' => 'Judeo-Persian',
                 'fan' => 'Fang',
                 'zen' => 'Zenaga',
                 'san' => 'Sanskrit',
                 'div' => 'Divehi',
                 'gmh' => 'German, Middle High (ca.1050-1500)',
                 'ron' => 'Romanian',
                 'nia' => 'Nias',
                 'bra' => 'Braj',
                 'aze' => 'Azerbaijani',
                 'fil' => 'Filipino',
                 'gem' => 'Germanic languages',
                 'gay' => 'Gayo',
                 'ace' => 'Achinese',
                 'bat' => 'Baltic languages',
                 'ben' => 'Bengali',
                 'umb' => 'Umbundu',
                 'ota' => 'Turkish, Ottoman (1500-1928)',
                 'alt' => 'Southern Altai',
                 'bem' => 'Bemba',
                 'xal' => 'Kalmyk',
                 'car' => 'Galibi Carib',
                 'smo' => 'Samoan',
                 'kal' => 'Kalaallisut',
                 'nqo' => 'N\'Ko',
                 'chi_cn' => 'Simplified Chinese',
                 'bua' => 'Buriat',
                 'map' => 'Austronesian languages',
                 'bai' => 'Bamileke languages',
                 'ber' => 'Berber languages)',
                 'day' => 'Land Dayak languages',
                 'mdf' => 'Moksha',
                 'jav' => 'Javanese',
                 'yid' => 'Yiddish',
                 'kam' => 'Kamba',
                 'arm' => 'Armenian',
                 'yao' => 'Yao',
                 'cze' => 'Czech',
                 'chi_tw' => 'Traditional Chinese',
                 'ira' => 'Iranian languages',
                 'srp' => 'Serbian',
                 'pon' => 'Pohnpeian',
                 'pus' => 'Pushto',
                 'kir' => 'Kirghiz',
                 'kan' => 'Kannada',
                 'tum' => 'Tumbuka',
                 'pag' => 'Pangasinan',
                 'nym' => 'Nyamwezi',
                 'ang' => 'English, Old (ca.450-1100)',
                 'fiu' => 'Finno-Ugrian languages)',
                 'mya' => 'Burmese',
                 'tir' => 'Tigrinya',
                 'suk' => 'Sukuma',
                 'enm' => 'English, Middle (1100-1500)',
                 'bej' => 'Beja',
                 'mlt' => 'Maltese',
                 'bad' => 'Banda languages',
                 'nub' => 'Nubian languages',
                 'baq' => 'Basque',
                 'lit' => 'Lithuanian',
                 'dgr' => 'Dogrib',
                 'ter' => 'Tereno',
                 'mni' => 'Manipuri',
                 'raj' => 'Rajasthani',
                 'kos' => 'Kosraean',
                 'del' => 'Delaware',
                 'chr' => 'Cherokee',
                 'tso' => 'Tsonga',
                 'tgk' => 'Tajik',
                 'kaz' => 'Kazakh',
                 'gle' => 'Irish',
                 'paa' => 'Papuan languages',
                 'kik' => 'Kikuyu',
                 'srn' => 'Sranan Tongo',
                 'ger' => 'German',
                 'nds' => 'Low German',
                 'luo' => 'Luo (Kenya and Tanzania)',
                 'eka' => 'Ekajuk',
                 'cai' => 'Central American Indian languages',
                 'slv' => 'Slovenian',
                 'gaa' => 'Ga',
                 'tgl' => 'Tagalog',
                 'jrb' => 'Judeo-Arabic',
                 'orm' => 'Oromo',
                 'yap' => 'Yapese',
                 'sla' => 'Slavic languages',
                 'hup' => 'Hupa',
                 'phi' => 'Philippine languages)',
                 'fre' => 'French',
                 'bis' => 'Bislama',
                 'new' => 'Nepal Bhasa',
                 'anp' => 'Angika',
                 'akk' => 'Akkadian',
                 'srd' => 'Sardinian',
                 'osa' => 'Osage',
                 'krl' => 'Karelian',
                 'zho' => 'Chinese',
                 'loz' => 'Lozi',
                 'bih' => 'Bihari languages',
                 'sad' => 'Sandawe',
                 'mah' => 'Marshallese',
                 'afr' => 'Afrikaans',
                 'sqi' => 'Albanian',
                 'tib' => 'Tibetan',
                 'ipk' => 'Inupiaq',
                 'hil' => 'Hiligaynon',
                 'cpf' => 'Creoles and pidgins, French-based',
                 'udm' => 'Udmurt',
                 'oji' => 'Ojibwa',
                 'aus' => 'Australian languages',
                 'zza' => 'Zaza',
                 'chb' => 'Chibcha',
                 'alg' => 'Algonquian languages',
                 'snk' => 'Soninke',
                 'kbd' => 'Kabardian',
                 'pro' => 'Provençal, Old (to 1500)',
                 'mga' => 'Irish, Middle (900-1200)',
                 'mag' => 'Magahi',
                 'wak' => 'Wakashan languages',
                 'twi' => 'Twi',
                 'slo' => 'Slovak',
                 'nai' => 'North American Indian languages',
                 'haw' => 'Hawaiian',
                 'pob' => 'Brasilian Portuguese',
                 'fry' => 'Western Frisian',
                 'sel' => 'Selkup',
                 'pal' => 'Pahlavi',
                 'frr' => 'Northern Frisian',
                 'mkd' => 'Macedonian',
                 'kua' => 'Kuanyama',
                 'cym' => 'Welsh',
                 'che' => 'Chechen',
                 'min' => 'Minangkabau',
                 'ban' => 'Balinese',
                 'lol' => 'Mongo',
                 'dum' => 'Dutch, Middle (ca.1050-1350)',
                 'kas' => 'Kashmiri',
                 'grb' => 'Grebo',
                 'was' => 'Washo',
                 'ina' => 'Interlingua (International Auxiliary Language Association)',
                 'sat' => 'Santali',
                 'tyv' => 'Tuvinian',
                 'tah' => 'Tahitian',
                 'mwr' => 'Marwari',
                 'egy' => 'Egyptian (Ancient)',
                 'sus' => 'Susu',
                 'som' => 'Somali',
                 'ido' => 'Ido',
                 'mal' => 'Malayalam',
                 'cha' => 'Chamorro',
                 'kon' => 'Kongo',
                 'cel' => 'Celtic languages',
                 'ven' => 'Venda',
                 'moh' => 'Mohawk',
                 'gsw' => 'Swiss German',
                 'him' => 'Himachali languages',
                 'tpi' => 'Tok Pisin',
                 'rus' => 'Russian',
                 'cre' => 'Cree',
                 'pol' => 'Polish',
                 'ady' => 'Adyghe',
                 'eus' => 'Basque',
                 'efi' => 'Efik',
                 'mac' => 'Macedonian',
                 'mos' => 'Mossi',
                 'doi' => 'Dogri',
                 'nzi' => 'Nzima',
                 'ain' => 'Ainu',
                 'wol' => 'Wolof',
                 'sit' => 'Sino-Tibetan languages',
                 'est' => 'Estonian',
                 'sun' => 'Sundanese',
                 'sem' => 'Semitic languages',
                 'chp' => 'Chipewyan',
                 'zun' => 'Zuni',
                 'cus' => 'Cushitic languages',
                 'mri' => 'Maori',
                 'cop' => 'Coptic',
                 'mis' => 'Uncoded languages',
                 'wen' => 'Sorbian languages',
                 'nwc' => 'Classical Newari',
                 'sms' => 'Skolt Sami',
                 'fon' => 'Fon',
                 'kab' => 'Kabyle',
                 'nic' => 'Niger-Kordofanian languages',
                 'rap' => 'Rapanui',
                 'pan' => 'Panjabi',
                 'oto' => 'Otomian languages',
                 'nep' => 'Nepali',
                 'shn' => 'Shan',
                 'men' => 'Mende',
                 'myv' => 'Erzya',
                 'fro' => 'French, Old (842-ca.1400)',
                 'tsi' => 'Tsimshian',
                 'rum' => 'Romanian',
                 'pap' => 'Papiamento',
                 'zxx' => 'No linguistic content',
                 'art' => 'Artificial languages',
                 'ara' => 'Arabic',
                 'bul' => 'Bulgarian',
                 'tiv' => 'Tiv',
                 'scn' => 'Sicilian',
                 'nyo' => 'Nyoro',
                 'kha' => 'Khasi',
                 'sma' => 'Southern Sami',
                 'mdr' => 'Mandar',
                 'hai' => 'Haida',
                 'vot' => 'Votic',
                 'ach' => 'Acoli',
                 'ale' => 'Aleut',
                 'nbl' => 'Ndebele, South',
                 'bre' => 'Breton',
                 'vai' => 'Vai',
                 'kru' => 'Kurukh',
                 'sai' => 'South American Indian languages',
                 'bod' => 'Tibetan',
                 'roh' => 'Romansh',
                 'ful' => 'Fulah',
                 'smj' => 'Lule Sami',
                 'tli' => 'Tlingit',
                 'gwi' => 'Gwich\'in',
                 'uig' => 'Uighur',
                 'smn' => 'Inari Sami',
                 'lad' => 'Ladino',
                 'csb' => 'Kashubian',
                 'wln' => 'Walloon',
                 'got' => 'Gothic',
                 'kaa' => 'Kara-Kalpak',
                 'qaa-qtz' => 'Reserved for local use',
                 'ewo' => 'Ewondo',
                 'afa' => 'Afro-Asiatic languages',
                 'fin' => 'Finnish',
                 'nav' => 'Navajo',
                 'ces' => 'Czech',
                 'kok' => 'Konkani',
                 'tet' => 'Tetum',
                 'tem' => 'Timne',
                 'sin' => 'Sinhala',
                 'ori' => 'Oriya',
                 'lus' => 'Lushai',
                 'srr' => 'Serer',
                 'pam' => 'Pampanga',
                 'ave' => 'Avestan',
                 'tkl' => 'Tokelau',
                 'ice' => 'Icelandic',
                 'inh' => 'Ingush',
                 'cpe' => 'Creoles and pidgins, English based',
                 'kaw' => 'Kawi',
                 'ath' => 'Athapascan languages',
                 'aar' => 'Afar',
                 'nob' => 'Bokmål, Norwegian',
                 'bho' => 'Bhojpuri',
                 'lub' => 'Luba-Katanga',
                 'kat' => 'Georgian',
                 'lat' => 'Latin',
                 'arp' => 'Arapaho',
                 'frs' => 'Eastern Frisian',
                 'gon' => 'Gondi',
                 'gba' => 'Gbaya',
                 'hit' => 'Hittite',
                 'hrv' => 'Croatian',
                 'war' => 'Waray',
                 'mad' => 'Madurese',
                 'bug' => 'Buginese',
                 'nld' => 'Dutch',
                 'run' => 'Rundi',
                 'bak' => 'Bashkir',
                 'rup' => 'Aromanian',
                 'mul' => 'Multiple languages',
                 'mon' => 'Mongolian',
                 'dua' => 'Duala',
                 'tig' => 'Tigre',
                 'cad' => 'Caddo',
                 'ilo' => 'Iloko',
                 'uga' => 'Ugaritic',
                 'nog' => 'Nogai',
                 'lin' => 'Lingala',
                 'cho' => 'Choctaw',
                 'oss' => 'Ossetian',
                 'jbo' => 'Lojban',
                 'crh' => 'Crimean Tatar',
                 'hmn' => 'Hmong',
                 'cpp' => 'Creoles and pidgins, Portuguese-based',
                 'kur' => 'Kurdish',
                 'ile' => 'Interlingue',
                 'tup' => 'Tupi languages',
                 'tat' => 'Tatar',
                 'sga' => 'Irish, Old (to 900)',
                 'glv' => 'Manx',
                 'sio' => 'Siouan languages',
                 'sgn' => 'Sign Languages',
                 'chy' => 'Cheyenne',
                 'goh' => 'German, Old High (ca.750-1050)',
                 'zap' => 'Zapotec',
                 'guj' => 'Gujarati',
                 'kar' => 'Karen languages',
                 'tsn' => 'Tswana',
                 'nso' => 'Pedi',
                 'znd' => 'Zande languages',
                 'sah' => 'Yakut',
                 'gla' => 'Gaelic',
                 'fur' => 'Friulian',
                 'mus' => 'Creek',
                 'grn' => 'Guarani',
                 'grc' => 'Greek, Ancient (to 1453)',
                 'ltz' => 'Luxembourgish',
                 'sas' => 'Sasak',
                 'nah' => 'Nahuatl languages',
                 'btk' => 'Batak languages',
                 'peo' => 'Persian, Old (ca.600-400 B.C.)',
                 'bel' => 'Belarusian',
                 'bal' => 'Baluchi',
                 'sna' => 'Shona',
                 'nyn' => 'Nyankole',
                 'kho' => 'Khotanese',
                 'chv' => 'Chuvash',
                 'ell' => 'Greek',
                 'zbl' => 'Blissymbols',
                 'crp' => 'Creoles and pidgins',
                 'inc' => 'Indic languages',
                 'lav' => 'Latvian',
                 'fij' => 'Fijian',
                 'cat' => 'Catalan',
                 'pli' => 'Pali',
                 'fas' => 'Persian',
                 'deu' => 'German',
                 'lah' => 'Lahnda',
                 'her' => 'Herero',
                 'ine' => 'Indo-European languages',
                 'vol' => 'Volapük',
                 'kom' => 'Komi',
                 'hin' => 'Hindi',
                 'wel' => 'Welsh',
                 'cau' => 'Caucasian languages',
                 'lez' => 'Lezghian',
                 'urd' => 'Urdu',
                 'mao' => 'Maori',
                 'den' => 'Slave (Athapascan)',
                 'mak' => 'Makasar',
                 'lui' => 'Luiseno',
                 'vie' => 'Vietnamese',
                 'non' => 'Norse, Old',
                 'apa' => 'Apache languages',
                 'lua' => 'Luba-Lulua',
                 'gez' => 'Geez',
                 'khi' => 'Khoisan languages',
                 'ceb' => 'Cebuano',
                 'ton' => 'Tonga (Tonga Islands)',
                 'dan' => 'Danish',
                 'smi' => 'Sami languages',
                 'ast' => 'Asturian',
                 'syr' => 'Syriac',
                 'dra' => 'Dravidian languages',
                 'gre' => 'Greek',
                 'glg' => 'Galician',
                 'zha' => 'Zhuang',
                 'tut' => 'Altaic languages',
                 'hau' => 'Hausa',
                 'iba' => 'Iban',
                 'kmb' => 'Kimbundu',
                 'yor' => 'Yoruba',
                 'mar' => 'Marathi',
                 'dut' => 'Dutch',
                 'sam' => 'Samaritan Aramaic',
                 'per' => 'Persian',
                 'dar' => 'Dargwa',
                 'phn' => 'Phoenician',
                 'eng' => 'English',
                 'heb' => 'Hebrew',
                 'chg' => 'Chagatai',
                 'bik' => 'Bikol',
                 'fao' => 'Faroese',
                 'ypk' => 'Yupik languages',
                 'iku' => 'Inuktitut',
                 'nno' => 'Norwegian Nynorsk',
                 'amh' => 'Amharic',
                 'niu' => 'Niuean',
                 'din' => 'Dinka',
                 'tam' => 'Tamil',
                 'nde' => 'Ndebele, North',
                 'hun' => 'Hungarian',
                 'ibo' => 'Igbo',
                 'NULL' => 'Serbo-Croatian',
                 'sme' => 'Northern Sami',
                 'chk' => 'Chuukese',
                 'arw' => 'Arawak',
                 'tmh' => 'Tamashek',
                 'chu' => 'Church Slavic',
                 'alb' => 'Albanian',
                 'cos' => 'Corsican',
                 'chn' => 'Chinook jargon',
                 'nau' => 'Nauru',
                 'awa' => 'Awadhi',
                 'kro' => 'Kru languages',
                 'tvl' => 'Tuvalu',
                 'dsb' => 'Lower Sorbian',
                 'tog' => 'Tonga (Nyasa)',
                 'ijo' => 'Ijo languages',
                 'zul' => 'Zulu',
                 'tha' => 'Thai',
                 'jpn' => 'Japanese',
                 'swa' => 'Swahili',
                 'bla' => 'Siksika',
                 'myn' => 'Mayan languages',
                 'spa' => 'Spanish',
                 'mlg' => 'Malagasy',
                 'bos' => 'Bosnian',
                 'msa' => 'Malay',
                 'kau' => 'Kanuri',
                 'mnc' => 'Manchu',
                 'nap' => 'Neapolitan',
                 'aka' => 'Akan',
                 'hmo' => 'Hiri Motu'
               };
$NameToThree = {
                 'Dimili' => 'zza',
                 'Tuvalu' => 'tvl',
                 'newari classique' => 'nwc',
                 'maori' => 'mao',
                 'Lule Sami' => 'smj',
                 'basque' => 'baq',
                 'tigré' => 'tig',
                 'mandar' => 'mdr',
                 'grec moderne (après 1453)' => 'gre',
                 'tereno' => 'ter',
                 'lezghien' => 'lez',
                 'massaï' => 'mas',
                 'sicilien' => 'scn',
                 'Maori' => 'mao',
                 'gaélique' => 'gla',
                 'lunda' => 'lun',
                 'Palauan' => 'pau',
                 'Vietnamese' => 'vie',
                 'navaho' => 'nav',
                 'ga' => 'gaa',
                 'sango' => 'sag',
                 'marathe' => 'mar',
                 'Armenian' => 'arm',
                 'interlingua (langue auxiliaire internationale)' => 'ina',
                 'Czech' => 'cze',
                 'selkoupe' => 'sel',
                 'kutenai' => 'kut',
                 'quechua' => 'que',
                 'Sepedi' => 'nso',
                 'australiennes, langues' => 'aus',
                 'Bliss' => 'zbl',
                 'Cook Islands Maori' => 'rar',
                 'Guarani' => 'grn',
                 'Yiddish' => 'yid',
                 'Classical Nepal Bhasa' => 'nwc',
                 'dogri' => 'doi',
                 'Iloko' => 'ilo',
                 'slavon d\'église' => 'chu',
                 'Azerbaijani' => 'aze',
                 'Nyanja' => 'nya',
                 'Creek' => 'mus',
                 'grec ancien (jusqu\'à 1453)' => 'grc',
                 'népalais' => 'nep',
                 'mongol' => 'mon',
                 'gbaya' => 'gba',
                 'dimli' => 'zza',
                 'Gondi' => 'gon',
                 'N\'Ko' => 'nqo',
                 'Icelandic' => 'ice',
                 'cheyenne' => 'chy',
                 'aymara' => 'aym',
                 'Acoli' => 'ach',
                 'Kamba' => 'kam',
                 'Norwegian Bokmål' => 'nob',
                 'Norwegian Bokmaal' => 'nob',
                 'norwegian bokmål' => 'nob',
                 'norwegian bokmaal' => 'nob',
                 'Oirat' => 'xal',
                 'Kongo' => 'kon',
                 'bachkir' => 'bak',
                 'koumyk' => 'kum',
                 'finno-ougriennes,langues' => 'fiu',
                 'élamite' => 'elx',
                 'Alemannic' => 'gsw',
                 'Tigrinya' => 'tir',
                 'kirmanjki' => 'zza',
                 'Chipewyan' => 'chp',
                 'Afro-Asiatic languages' => 'afa',
                 'Ido' => 'ido',
                 'yapois' => 'yap',
                 'Selkup' => 'sel',
                 'hébreu' => 'heb',
                 'Kanuri' => 'kau',
                 'haida' => 'hai',
                 'sioux, langues' => 'sio',
                 'yao' => 'yao',
                 'Occitan (post 1500)' => 'oci',
                 'Efik' => 'efi',
                 'Provençal, Old (to 1500)' => 'pro',
                 'Marwari' => 'mwr',
                 'néerlandais' => 'dut',
                 'Ossetian' => 'oss',
                 'turc ottoman (1500-1928)' => 'ota',
                 'occitan (après 1500)' => 'oci',
                 'Lingala' => 'lin',
                 'Pali' => 'pli',
                 'kalmouk' => 'xal',
                 'Hungarian' => 'hun',
                 'cornique' => 'cor',
                 'Scots' => 'sco',
                 'kachoube' => 'csb',
                 'Sorbian languages' => 'wen',
                 'norrois, vieux' => 'non',
                 'suédois' => 'swe',
                 'Ewondo' => 'ewo',
                 'inupiaq' => 'ipk',
                 'Church Slavic' => 'chu',
                 'tibétain' => 'tib',
                 'Austronesian languages' => 'map',
                 'Ndebele, North' => 'nde',
                 'luxembourgeois' => 'ltz',
                 'Zaza' => 'zza',
                 'alsacien' => 'gsw',
                 'roumain' => 'rum',
                 'Norwegian' => 'nor',
                 'Nzima' => 'nzi',
                 'frison septentrional' => 'frr',
                 'shona' => 'sna',
                 'asturoléonais' => 'ast',
                 'blackfoot' => 'bla',
                 'napolitain' => 'nap',
                 'mapuche' => 'arn',
                 'interlingue' => 'ile',
                 'banda, langues' => 'bad',
                 'nigéro-kordofaniennes, langues' => 'nic',
                 'frison oriental' => 'frs',
                 'Baltic languages' => 'bat',
                 'Mandar' => 'mdr',
                 'touva' => 'tyv',
                 'Interlingue' => 'ile',
                 'Sichuan Yi' => 'iii',
                 'galicien' => 'glg',
                 'sarde' => 'srd',
                 'edo' => 'bin',
                 'mongo' => 'lol',
                 'Kosraean' => 'kos',
                 'Crimean Tatar' => 'crh',
                 'Asturian' => 'ast',
                 'kazakh' => 'kaz',
                 'Chichewa' => 'nya',
                 'Kapampangan' => 'pam',
                 'Coptic' => 'cop',
                 'Sinhala' => 'sin',
                 'Kwanyama' => 'kua',
                 'Iroquoian languages' => 'iro',
                 'Quechua' => 'que',
                 'Bemba' => 'bem',
                 'allemand, moyen haut (ca. 1050-1500)' => 'gmh',
                 'Asturleonese' => 'ast',
                 'French' => 'fre',
                 'Tigre' => 'tig',
                 'Galibi Carib' => 'car',
                 'Sardinian' => 'srd',
                 'Grebo' => 'grb',
                 'zenaga' => 'zen',
                 'chamorro' => 'cha',
                 'manipuri' => 'mni',
                 'kabardien' => 'kbd',
                 'pedi' => 'nso',
                 'sami du Nord' => 'sme',
                 'kirghiz' => 'kir',
                 'amérindiennes de l\'Amérique centrale, langues' => 'cai',
                 'Igbo' => 'ibo',
                 'Salishan languages' => 'sal',
                 'cherokee' => 'chr',
                 'umbundu' => 'umb',
                 'Indic languages' => 'inc',
                 'Creoles and pidgins' => 'crp',
                 'Classical Newari' => 'nwc',
                 'Nepal Bhasa' => 'new',
                 'Siouan languages' => 'sio',
                 'turkmène' => 'tuk',
                 'soninké' => 'snk',
                 'Mandingo' => 'man',
                 'Latin' => 'lat',
                 'créole haïtien' => 'hat',
                 'Luba-Lulua' => 'lua',
                 'Swedish' => 'swe',
                 'serbe' => 'srp',
                 'bas allemand' => 'nds',
                 'chinese_traditional' => 'chi_tw',
                 'Tamashek' => 'tmh',
                 'Upper Sorbian' => 'hsb',
                 'Indonesian' => 'ind',
                 'sotho du Nord' => 'nso',
                 'iroquoises, langues' => 'iro',
                 'Edo' => 'bin',
                 'Cherokee' => 'chr',
                 'Ekajuk' => 'eka',
                 'Bislama' => 'bis',
                 'kwanyama' => 'kua',
                 'gothique' => 'got',
                 'chinese_simplified' => 'chi_cn',
                 'Pashto' => 'pus',
                 'Sicilian' => 'scn',
                 'Romance languages' => 'roa',
                 'créoles et pidgins basés sur le français' => 'cpf',
                 'Yupik languages' => 'ypk',
                 'Uighur' => 'uig',
                 'Tsonga' => 'tso',
                 'lushai' => 'lus',
                 'anglais' => 'eng',
                 'mandingue' => 'man',
                 'zandé, langues' => 'znd',
                 'Pahlavi' => 'pal',
                 'Kirmanjki' => 'zza',
                 'Akkadian' => 'akk',
                 'Shan' => 'shn',
                 'Nilo-Saharan languages' => 'ssa',
                 'Thai' => 'tha',
                 'Vai' => 'vai',
                 'Inari Sami' => 'smn',
                 'phénicien' => 'phn',
                 'chipewyan' => 'chp',
                 'salishennes, langues' => 'sal',
                 'Greek, Ancient (to 1453)' => 'grc',
                 'Ancient Greek' => 'grc',
                 'ancient greek' => 'grc',
                 'Kimbundu' => 'kmb',
                 'Dargwa' => 'dar',
                 'Adangme' => 'ada',
                 'Tlingit' => 'tli',
                 'serbo-croate' => '(none)',
                 'Aleut' => 'ale',
                 'Nynorsk, Norwegian' => 'nno',
                 'choctaw' => 'cho',
                 'Kirdki' => 'zza',
                 'tigrigna' => 'tir',
                 'karen, langues' => 'kar',
                 'sino-tibétaines, langues' => 'sit',
                 'gaélique écossais' => 'gla',
                 'Maldivian' => 'div',
                 'géorgien' => 'geo',
                 'slovaque' => 'slo',
                 'grebo' => 'grb',
                 'italien' => 'ita',
                 'avestique' => 'ave',
                 'gayo' => 'gay',
                 'tai, langues' => 'tai',
                 'khasi' => 'kha',
                 'Tuvinian' => 'tyv',
                 'galla' => 'orm',
                 'Romansh' => 'roh',
                 'bikol' => 'bik',
                 'couchitiques, langues' => 'cus',
                 'Slavic languages' => 'sla',
                 'Pohnpeian' => 'pon',
                 'sidamo' => 'sid',
                 'langues non codées' => 'mis',
                 'German, Old High (ca.750-1050)' => 'goh',
                 'Mari' => 'chm',
                 'non applicable' => 'zxx',
                 'Telugu' => 'tel',
                 'Yakut' => 'sah',
                 'bamiléké, langues' => 'bai',
                 'Spanish' => 'spa',
                 'Sanskrit' => 'san',
                 'Urdu' => 'urd',
                 'tswana' => 'tsn',
                 'Central Khmer' => 'khm',
                 'arménien' => 'arm',
                 'amharique' => 'amh',
                 'Chinook jargon' => 'chn',
                 'Adyghe' => 'ady',
                 'Avaric' => 'ava',
                 'Achinese' => 'ace',
                 'tatar de Crimé' => 'crh',
                 'Niuean' => 'niu',
                 'Xhosa' => 'xho',
                 'javanais' => 'jav',
                 'zazaki' => 'zza',
                 'Dimli' => 'zza',
                 'vote' => 'vot',
                 'castillan' => 'spa',
                 'Simplified Chinese' => 'chi_cn',
                 'bable' => 'ast',
                 'arapaho' => 'arp',
                 'kannada' => 'kan',
                 'Belarusian' => 'bel',
                 'Chuukese' => 'chk',
                 'Tereno' => 'ter',
                 'Ladino' => 'lad',
                 'Khotanese' => 'kho',
                 'Hawaiian' => 'haw',
                 'Southern Altai' => 'alt',
                 'Khasi' => 'kha',
                 'éwondo' => 'ewo',
                 'Official Aramaic (700-300 BCE)' => 'arc',
                 'altaïques, langues' => 'tut',
                 'moksa' => 'mdf',
                 'vieux slave' => 'chu',
                 'Tai languages' => 'tai',
                 'tahitien' => 'tah',
                 'Kikuyu' => 'kik',
                 'lojban' => 'jbo',
                 'Chinese (traditional)' => 'chi_tw',
                 'indéterminée' => 'und',
                 'Arumanian' => 'rup',
                 'Wolaytta' => 'wal',
                 'temne' => 'tem',
                 'Wolof' => 'wol',
                 'Iranian languages' => 'ira',
                 'Ainu' => 'ain',
                 'islandais' => 'ice',
                 'thaï' => 'tha',
                 'Ga' => 'gaa',
                 'Old Church Slavonic' => 'chu',
                 'Sasak' => 'sas',
                 'macédo-roumain' => 'rup',
                 'inuktitut' => 'iku',
                 'magahi' => 'mag',
                 'Geez' => 'gez',
                 'Sandawe' => 'sad',
                 'Karelian' => 'krl',
                 'nias' => 'nia',
                 'Kabyle' => 'kab',
                 'osage' => 'osa',
                 'French, Middle (ca.1400-1600)' => 'frm',
                 'Arabic' => 'ara',
                 'sémitiques, langues' => 'sem',
                 'réservée à l\'usage local' => 'qaa-qtz',
                 'Fang' => 'fan',
                 'Zhuang' => 'zha',
                 'Limburgish' => 'lim',
                 'mi\'kmaq' => 'mic',
                 'Washo' => 'was',
                 'bouriate' => 'bua',
                 'marvari' => 'mwr',
                 'Walloon' => 'wln',
                 'Not applicable' => 'zxx',
                 'Herero' => 'her',
                 'English, Middle (1100-1500)' => 'enm',
                 'afar' => 'aar',
                 'muskogee' => 'mus',
                 'syriaque classique' => 'syc',
                 'Gwich\'in' => 'gwi',
                 'xhosa' => 'xho',
                 'multilingue' => 'mul',
                 'Caucasian languages' => 'cau',
                 'Micmac' => 'mic',
                 'afrihili' => 'afh',
                 'ijo, langues' => 'ijo',
                 'singhalais' => 'sin',
                 'samaritain' => 'sam',
                 'efik' => 'efi',
                 'créoles et pidgins basés sur le portugais' => 'cpp',
                 'finnois' => 'fin',
                 'tlhIngan-Hol' => 'tlh',
                 'Hiri Motu' => 'hmo',
                 'slaves, langues' => 'sla',
                 'Kalaallisut' => 'kal',
                 'Swahili' => 'swa',
                 'Limburgan' => 'lim',
                 'haïtien' => 'hat',
                 'Tokelau' => 'tkl',
                 'wolaitta' => 'wal',
                 'pahlavi' => 'pal',
                 'lamba' => 'lam',
                 'Welsh' => 'wel',
                 'palau' => 'pau',
                 'Dravidian languages' => 'dra',
                 'allemand, vieux haut (ca. 750-1050)' => 'goh',
                 'Low Saxon' => 'nds',
                 'nahuatl, langues' => 'nah',
                 'celtes, langues' => 'cel',
                 'luo (Kenya et Tanzanie)' => 'luo',
                 'ekajuk' => 'eka',
                 'Basque' => 'baq',
                 'avar' => 'ava',
                 'Western Pahari languages' => 'him',
                 'sepedi' => 'nso',
                 'letton' => 'lav',
                 'chuang' => 'zha',
                 'chichewa' => 'nya',
                 'tadjik' => 'tgk',
                 'kosrae' => 'kos',
                 'néerlandais moyen (ca. 1050-1350)' => 'dum',
                 'Kawi' => 'kaw',
                 'fanti' => 'fat',
                 'ndonga' => 'ndo',
                 'aragonais' => 'arg',
                 'nordamérindiennes, langues' => 'nai',
                 'Haitian' => 'hat',
                 'kikuyu' => 'kik',
                 'Kara-Kalpak' => 'kaa',
                 'Gothic' => 'got',
                 'kashmiri' => 'kas',
                 'nynorsk, norvégien' => 'nno',
                 'Malayalam' => 'mal',
                 'wallon' => 'wln',
                 'Soninke' => 'snk',
                 'Macedo-Romanian' => 'rup',
                 'Interlingua (International Auxiliary Language Association)' => 'ina',
                 'sranan tongo' => 'srn',
                 'papoues, langues' => 'paa',
                 'Divehi' => 'div',
                 'norwegian_bokmal' => 'nob',
                 'Newari' => 'new',
                 'Occidental' => 'ile',
                 'hmong' => 'hmn',
                 'Moldavian' => 'rum',
                 'vieux bulgare' => 'chu',
                 'Sign Languages' => 'sgn',
                 'symboles Bliss' => 'zbl',
                 'Kuanyama' => 'kua',
                 'sami de Lule' => 'smj',
                 'judéo-persan' => 'jpr',
                 'Caddo' => 'cad',
                 'Finnish' => 'fin',
                 'Judeo-Persian' => 'jpr',
                 'Zande languages' => 'znd',
                 'kongo' => 'kon',
                 'Catalan' => 'cat',
                 'Chechen' => 'che',
                 'Nuosu' => 'iii',
                 'Skolt Sami' => 'sms',
                 'Arawak' => 'arw',
                 'Marshallese' => 'mah',
                 'Chibcha' => 'chb',
                 'allemand' => 'ger',
                 'Tagalog' => 'tgl',
                 'moré' => 'mos',
                 'Lower Sorbian' => 'dsb',
                 'Neapolitan' => 'nap',
                 'Serbian' => 'srp',
                 'dakota' => 'dak',
                 'papiamento' => 'pap',
                 'ido' => 'ido',
                 'kurde' => 'kur',
                 'Rarotongan' => 'rar',
                 'Bable' => 'ast',
                 'Nauru' => 'nau',
                 'Lithuanian' => 'lit',
                 'Bini' => 'bin',
                 'Greenlandic' => 'kal',
                 'Mapudungun' => 'arn',
                 'sumérien' => 'sux',
                 'South American Indian languages' => 'sai',
                 'bemba' => 'bem',
                 'Inupiaq' => 'ipk',
                 'German' => 'ger',
                 'sames, langues' => 'smi',
                 'Karen languages' => 'kar',
                 'rwanda' => 'kin',
                 'Nyoro' => 'nyo',
                 'azéri' => 'aze',
                 'Tonga (Nyasa)' => 'tog',
                 'malayalam' => 'mal',
                 'coréen' => 'kor',
                 'oriya' => 'ori',
                 'Kumyk' => 'kum',
                 'Philippine languages)' => 'phi',
                 'anglais moyen (1100-1500)' => 'enm',
                 'tagalog' => 'tgl',
                 'Altaic languages' => 'tut',
                 'pohnpei' => 'pon',
                 'Traditional Chinese' => 'chi_tw',
                 'Tumbuka' => 'tum',
                 'fidjien' => 'fij',
                 'tiv' => 'tiv',
                 'Dzongkha' => 'dzo',
                 'Songhai languages' => 'son',
                 'Luo (Kenya and Tanzania)' => 'luo',
                 'Prakrit languages' => 'pra',
                 'Lao' => 'lao',
                 'prâkrit, langues' => 'pra',
                 'iakoute' => 'sah',
                 'judéo-arabe' => 'jrb',
                 'Nogai' => 'nog',
                 'Siksika' => 'bla',
                 'frison occidental' => 'fry',
                 'Dogri' => 'doi',
                 'maori des îles Cook' => 'rar',
                 'tokelau' => 'tkl',
                 'German, Middle High (ca.1050-1500)' => 'gmh',
                 'tupi, langues' => 'tup',
                 'birman' => 'bur',
                 'akkadien' => 'akk',
                 'Manx' => 'glv',
                 'Danish' => 'dan',
                 'breton' => 'bre',
                 'fang' => 'fan',
                 'Alsatian' => 'gsw',
                 'Kachin' => 'kac',
                 'Udmurt' => 'udm',
                 'herero' => 'her',
                 'Sundanese' => 'sun',
                 'Khoisan languages' => 'khi',
                 'maya, langues' => 'myn',
                 'Madurese' => 'mad',
                 'Sotho, Southern' => 'sot',
                 'Slovenian' => 'slv',
                 'goudjrati' => 'guj',
                 'soussou' => 'sus',
                 'Eastern Frisian' => 'frs',
                 'Votic' => 'vot',
                 'krou, langues' => 'kro',
                 'Rapanui' => 'rap',
                 'Castilian' => 'spa',
                 'Turkmen' => 'tuk',
                 'nilo-sahariennes, langues' => 'ssa',
                 'luba-katanga' => 'lub',
                 'Akan' => 'aka',
                 'nogaï' => 'nog',
                 'estonien' => 'est',
                 'Fijian' => 'fij',
                 'zuni' => 'zun',
                 'luba-lulua' => 'lua',
                 'Crimean Turkish' => 'crh',
                 'Wakashan languages' => 'wak',
                 'nyankolé' => 'nyn',
                 'Artificial languages' => 'art',
                 'Uzbek' => 'uzb',
                 'Greek' => 'gre',
                 'Manobo languages' => 'mno',
                 'khotanais' => 'kho',
                 'aroumain' => 'rup',
                 'Turkish, Ottoman (1500-1928)' => 'ota',
                 'Hittite' => 'hit',
                 'newari' => 'new',
                 'carib' => 'car',
                 'Georgian' => 'geo',
                 'Aromanian' => 'rup',
                 'Luiseno' => 'lui',
                 'carélien' => 'krl',
                 'Oromo' => 'orm',
                 'tatar' => 'tat',
                 'French, Old (842-ca.1400)' => 'fro',
                 'peul' => 'ful',
                 'Niger-Kordofanian languages' => 'nic',
                 'léonais' => 'ast',
                 'Chamic languages' => 'cmc',
                 'frioulan' => 'fur',
                 'mapudungun' => 'arn',
                 'russe' => 'rus',
                 'Tahitian' => 'tah',
                 'bichlamar' => 'bis',
                 'Dyula' => 'dyu',
                 'Munda languages' => 'mun',
                 'indonésien' => 'ind',
                 'wakashanes, langues' => 'wak',
                 'Uncoded languages' => 'mis',
                 'kachin' => 'kac',
                 'samoan' => 'smo',
                 'norvégien bokmål' => 'nob',
                 'sandawe' => 'sad',
                 'South Ndebele' => 'nbl',
                 'Ijo languages' => 'ijo',
                 'Australian languages' => 'aus',
                 'Blin' => 'byn',
                 'abkhaze' => 'abk',
                 'flamand' => 'dut',
                 'judéo-espagnol' => 'lad',
                 'madourais' => 'mad',
                 'esclave (athapascan)' => 'den',
                 'Portuguese' => 'por',
                 'jingpho' => 'kac',
                 'Luba-Katanga' => 'lub',
                 'Luxembourgish' => 'ltz',
                 'Somali' => 'som',
                 'kanouri' => 'kau',
                 'washo' => 'was',
                 'baltes, langues' => 'bat',
                 'Breton' => 'bre',
                 'Old Newari' => 'nwc',
                 'Gujarati' => 'guj',
                 'langues himachalis' => 'him',
                 'galibi' => 'car',
                 'igbo' => 'ibo',
                 'guèze' => 'gez',
                 'Bashkir' => 'bak',
                 'Volapük' => 'vol',
                 'mounda, langues' => 'mun',
                 'Zazaki' => 'zza',
                 'sotho du Sud' => 'sot',
                 'venda' => 'ven',
                 'Oriya' => 'ori',
                 'Scottish Gaelic' => 'gla',
                 'tlingit' => 'tli',
                 'Delaware' => 'del',
                 'germaniques, langues' => 'gem',
                 'Hiligaynon' => 'hil',
                 'Moksha' => 'mdf',
                 'Baluchi' => 'bal',
                 'No linguistic content' => 'zxx',
                 'Mirandese' => 'mwl',
                 'Bikol' => 'bik',
                 'Tonga (Tonga Islands)' => 'ton',
                 'Maithili' => 'mai',
                 'tamoul' => 'tam',
                 'copte' => 'cop',
                 'pas de contenu linguistique' => 'zxx',
                 'Haida' => 'hai',
                 'français ancien (842-ca.1400)' => 'fro',
                 'Bhojpuri' => 'bho',
                 'Bantu languages' => 'bnt',
                 'mannois' => 'glv',
                 'arabe' => 'ara',
                 'Northern Sotho' => 'nso',
                 'Venda' => 'ven',
                 'Erzya' => 'myv',
                 'dargwa' => 'dar',
                 'Jingpho' => 'kac',
                 'makassar' => 'mak',
                 'romanes, langues' => 'roa',
                 'Sango' => 'sag',
                 'tok pisin' => 'tpi',
                 'irlandais' => 'gle',
                 'Sinhalese' => 'sin',
                 'Tatar' => 'tat',
                 'français' => 'fre',
                 'Albanian' => 'alb',
                 'occitan ancien (jusqu\'à 1500)' => 'pro',
                 'ouïgour' => 'uig',
                 'Sami languages' => 'smi',
                 'Umbundu' => 'umb',
                 'Afar' => 'aar',
                 'Chamorro' => 'cha',
                 'batak, langues' => 'btk',
                 'sogdien' => 'sog',
                 'Tiv' => 'tiv',
                 'Iban' => 'iba',
                 'yupik, langues' => 'ypk',
                 'kimbundu' => 'kmb',
                 'vietnamien' => 'vie',
                 'kuanyama' => 'kua',
                 'Norwegian Nynorsk' => 'nno',
                 'norwegian nynorsk' => 'nno',
                 'zaza' => 'zza',
                 'Sindhi' => 'snd',
                 'Pedi' => 'nso',
                 'Estonian' => 'est',
                 'Ojibwa' => 'oji',
                 'maithili' => 'mai',
                 'philippines, langues' => 'phi',
                 'Komi' => 'kom',
                 'Undetermined' => 'und',
                 'chibcha' => 'chb',
                 'Mongolian' => 'mon',
                 'Ewe' => 'ewe',
                 'Land Dayak languages' => 'day',
                 'sami du Sud' => 'sma',
                 'Magahi' => 'mag',
                 'Ossetic' => 'oss',
                 'ouszbek' => 'uzb',
                 'bas-sorabe' => 'dsb',
                 'Serbo-Croatian' => '(none)',
                 'Kpelle' => 'kpe',
                 'Afrikaans' => 'afr',
                 'nyanja' => 'nya',
                 'Tsimshian' => 'tsi',
                 'Filipino' => 'fil',
                 'provençal ancien (jusqu\'à 1500)' => 'pro',
                 'mari' => 'chm',
                 'chewa' => 'nya',
                 'sérère' => 'srr',
                 'Nepali' => 'nep',
                 'télougou' => 'tel',
                 'chuuk' => 'chk',
                 'Tok Pisin' => 'tpi',
                 'tchétchène' => 'che',
                 'Hmong' => 'hmn',
                 'Sakan' => 'kho',
                 'Ingush' => 'inh',
                 'ganda' => 'lug',
                 'yi de Sichuan' => 'iii',
                 'khmer central' => 'khm',
                 'japonais' => 'jpn',
                 'Kannada' => 'kan',
                 'Sidamo' => 'sid',
                 'lahnda' => 'lah',
                 'Yapese' => 'yap',
                 'Apache languages' => 'apa',
                 'Hupa' => 'hup',
                 'Rundi' => 'run',
                 'Brasilian Portuguese' => 'pob',
                 'baloutchi' => 'bal',
                 'niué' => 'niu',
                 'Masai' => 'mas',
                 'saxon, bas' => 'nds',
                 'mohawk' => 'moh',
                 'Mohawk' => 'moh',
                 'Gikuyu' => 'kik',
                 'Persian' => 'per',
                 'Old Bulgarian' => 'chu',
                 'Kru languages' => 'kro',
                 'Judeo-Arabic' => 'jrb',
                 'caddo' => 'cad',
                 'Fulah' => 'ful',
                 'ilocano' => 'ilo',
                 'pendjabi' => 'pan',
                 'Dene Suline' => 'chp',
                 'Dogrib' => 'dgr',
                 'Zulu' => 'zul',
                 'Ndebele, South' => 'nbl',
                 'klingon' => 'tlh',
                 'Papiamento' => 'pap',
                 'Russian' => 'rus',
                 'celtiques, langues' => 'cel',
                 'Samoan' => 'smo',
                 'Awadhi' => 'awa',
                 'Mong' => 'hmn',
                 'Mi\'kmaq' => 'mic',
                 'turc' => 'tur',
                 'Hindi' => 'hin',
                 'Esperanto' => 'epo',
                 'persan' => 'per',
                 'brasilian portuguese' => 'pob',
                 'irlandais moyen (900-1200)' => 'mga',
                 'Mon-Khmer languages' => 'mkh',
                 'Dakota' => 'dak',
                 'Javanese' => 'jav',
                 'konkani' => 'kok',
                 'soundanais' => 'sun',
                 'tsimshian' => 'tsi',
                 'tchèque' => 'cze',
                 'English, Old (ca.450-1100)' => 'ang',
                 'Pangasinan' => 'pag',
                 'bedja' => 'bej',
                 'Dutch, Middle (ca.1050-1350)' => 'dum',
                 'ougaritique' => 'uga',
                 'khoïsan, langues' => 'khi',
                 'twi' => 'twi',
                 'dayak, langues' => 'day',
                 'Western Frisian' => 'fry',
                 'unknown' => 'xxx',
                 'Aymara' => 'aym',
                 'écossais' => 'sco',
                 'Gbaya' => 'gba',
                 'Blissymbolics' => 'zbl',
                 'Lozi' => 'loz',
                 'hindi' => 'hin',
                 'albanais' => 'alb',
                 'Chagatai' => 'chg',
                 'yiddish' => 'yid',
                 'Nias' => 'nia',
                 'Bambara' => 'bam',
                 'dravidiennes,langues' => 'dra',
                 'allemand, bas' => 'nds',
                 'djaghataï' => 'chg',
                 'Northern Frisian' => 'frr',
                 'Yao' => 'yao',
                 'portugais' => 'por',
                 'Reserved for local use' => 'qaa-qtz',
                 'lingala' => 'lin',
                 'kirdki' => 'zza',
                 'altai du Sud' => 'alt',
                 'Dhivehi' => 'div',
                 'fon' => 'fon',
                 'Berber languages)' => 'ber',
                 'Croatian' => 'hrv',
                 'Tajik' => 'tgk',
                 'luiseno' => 'lui',
                 'sasak' => 'sas',
                 'hongrois' => 'hun',
                 'Manchu' => 'mnc',
                 'bugi' => 'bug',
                 'Faroese' => 'fao',
                 'pampangan' => 'pam',
                 'Kurukh' => 'kru',
                 'ndébélé du Sud' => 'nbl',
                 'angika' => 'anp',
                 'syriaque' => 'syr',
                 'Buriat' => 'bua',
                 'Southern Sami' => 'sma',
                 'Dinka' => 'din',
                 'Moldovan' => 'rum',
                 'Hebrew' => 'heb',
                 'ndébélé du Nord' => 'nde',
                 'Semitic languages' => 'sem',
                 'pangasinan' => 'pag',
                 'sukuma' => 'suk',
                 'tumbuka' => 'tum',
                 'aïnou' => 'ain',
                 'ukrainien' => 'ukr',
                 'indo-aryennes, langues' => 'inc',
                 'Avestan' => 'ave',
                 'français moyen (1400-1600)' => 'frm',
                 'Klingon' => 'tlh',
                 'Gorontalo' => 'gor',
                 'nogay' => 'nog',
                 'Classical Syriac' => 'syc',
                 'Lushai' => 'lus',
                 'Cushitic languages' => 'cus',
                 'Minangkabau' => 'min',
                 'awadhi' => 'awa',
                 'Flemish' => 'dut',
                 'Inuktitut' => 'iku',
                 'Algonquian languages' => 'alg',
                 'kurukh' => 'kru',
                 'Tamil' => 'tam',
                 'Tswana' => 'tsn',
                 'bosniaque' => 'bos',
                 'balinais' => 'ban',
                 'Cheyenne' => 'chy',
                 'Mende' => 'men',
                 'sakan' => 'kho',
                 'ourdou' => 'urd',
                 'hiligaynon' => 'hil',
                 'Kurdish' => 'kur',
                 'perse, vieux (ca. 600-400 av. J.-C.)' => 'peo',
                 'Tupi languages' => 'tup',
                 'Pilipino' => 'fil',
                 'valencien' => 'cat',
                 'Banda languages' => 'bad',
                 'erza' => 'myv',
                 'micmac' => 'mic',
                 'chinois' => 'chi',
                 'afro-asiatiques, langues' => 'afa',
                 'Lunda' => 'lun',
                 'Kyrgyz' => 'kir',
                 'Malay' => 'may',
                 'Gayo' => 'gay',
                 'môn-khmer, langues' => 'mkh',
                 'mirandais' => 'mwl',
                 'algonquines, langues' => 'alg',
                 'Ugaritic' => 'uga',
                 'Romanian' => 'rum',
                 'Irish' => 'gle',
                 'Nahuatl languages' => 'nah',
                 'Nubian languages' => 'nub',
                 'Manipuri' => 'mni',
                 'Burmese' => 'bur',
                 'bilen' => 'byn',
                 'bengali' => 'ben',
                 'Kinyarwanda' => 'kin',
                 'Central American Indian languages' => 'cai',
                 'bhojpuri' => 'bho',
                 'Kutenai' => 'kut',
                 'Cree' => 'cre',
                 'kom' => 'kom',
                 'Kirghiz' => 'kir',
                 'Gaelic' => 'gla',
                 'iban' => 'iba',
                 'Mapuche' => 'arn',
                 'kpellé' => 'kpe',
                 'Batak languages' => 'btk',
                 'austronésiennes, langues' => 'map',
                 'haut-sorabe' => 'hsb',
                 'zoulou' => 'zul',
                 'Letzeburgesch' => 'ltz',
                 'gond' => 'gon',
                 'Creoles and pidgins, French-based' => 'cpf',
                 'Amharic' => 'amh',
                 'delaware' => 'del',
                 'Ganda' => 'lug',
                 'bas saxon' => 'nds',
                 'Sranan Tongo' => 'srn',
                 'tsonga' => 'tso',
                 'tchouvache' => 'chv',
                 'bulgare' => 'bul',
                 'Swiss German' => 'gsw',
                 'Leonese' => 'ast',
                 'Japanese' => 'jpn',
                 'Corsican' => 'cos',
                 'gorontalo' => 'gor',
                 'Persian, Old (ca.600-400 B.C.)' => 'peo',
                 'Serer' => 'srr',
                 'malais' => 'may',
                 'karib' => 'car',
                 'chames, langues' => 'cmc',
                 'Saxon, Low' => 'nds',
                 'danois' => 'dan',
                 'hittite' => 'hit',
                 'sud-amérindiennes, langues' => 'sai',
                 'guarani' => 'grn',
                 'Chuvash' => 'chv',
                 'wolaytta' => 'wal',
                 'swahili' => 'swa',
                 'Timne' => 'tem',
                 'rundi' => 'run',
                 'Galician' => 'glg',
                 'Irish, Old (to 900)' => 'sga',
                 'lozi' => 'loz',
                 'Indo-European languages' => 'ine',
                 'espagnol' => 'spa',
                 'volapük' => 'vol',
                 'créoles et pidgins basés sur l\'anglais' => 'cpe',
                 'Punjabi' => 'pan',
                 'nepal bhasa' => 'new',
                 'Germanic languages' => 'gem',
                 'tsigane' => 'rom',
                 'sanskrit' => 'san',
                 'Syriac' => 'syr',
                 'Wolaitta' => 'wal',
                 'ingouche' => 'inh',
                 'Celtic languages' => 'cel',
                 'Afrihili' => 'afh',
                 'Lamba' => 'lam',
                 'kamba' => 'kam',
                 'asturien' => 'ast',
                 'Phoenician' => 'phn',
                 'cree' => 'cre',
                 'chinook, jargon' => 'chn',
                 'Polish' => 'pol',
                 'nauruan' => 'nau',
                 'dioula' => 'dyu',
                 'Zapotec' => 'zap',
                 'songhai, langues' => 'son',
                 'Waray' => 'war',
                 'cebuano' => 'ceb',
                 'Bulgarian' => 'bul',
                 'dimili' => 'zza',
                 'Imperial Aramaic (700-300 BCE)' => 'arc',
                 'créoles et pidgins' => 'crp',
                 'langues des signes' => 'sgn',
                 'Angika' => 'anp',
                 'pali' => 'pli',
                 'waray' => 'war',
                 'Friulian' => 'fur',
                 'alémanique' => 'gsw',
                 'Cornish' => 'cor',
                 'Norse, Old' => 'non',
                 'Buginese' => 'bug',
                 'Valencian' => 'cat',
                 'araméen d\'empire (700-300 BCE)' => 'arc',
                 'zapotèque' => 'zap',
                 'Northern Sami' => 'sme',
                 'Ukrainian' => 'ukr',
                 'douala' => 'dua',
                 'Mongo' => 'lol',
                 'Uyghur' => 'uig',
                 'slovène' => 'slv',
                 'mandchou' => 'mnc',
                 'Slovak' => 'slo',
                 'lao' => 'lao',
                 'Fanti' => 'fat',
                 'Sumerian' => 'sux',
                 'tongan (Îles Tonga)' => 'ton',
                 'Occitan, Old (to 1500)' => 'pro',
                 'Gilbertese' => 'gil',
                 'Fon' => 'fon',
                 'malgache' => 'mlg',
                 'Navajo' => 'nav',
                 'maltais' => 'mlt',
                 'adyghé' => 'ady',
                 'moldave' => 'rum',
                 'braj' => 'bra',
                 'North American Indian languages' => 'nai',
                 'artificielles, langues' => 'art',
                 'dzongkha' => 'dzo',
                 'akan' => 'aka',
                 'suisse alémanique' => 'gsw',
                 'afrikaans' => 'afr',
                 'Arapaho' => 'arp',
                 'Chinese' => 'chi',
                 'Beja' => 'bej',
                 'Pampanga' => 'pam',
                 'Samaritan Aramaic' => 'sam',
                 'Creoles and pidgins, Portuguese-based' => 'cpp',
                 'nubiennes, langues' => 'nub',
                 'Twi' => 'twi',
                 'Bilin' => 'byn',
                 'Bengali' => 'ben',
                 'marshall' => 'mah',
                 'apaches, langues' => 'apa',
                 'macédonien' => 'mac',
                 'iraniennes, langues' => 'ira',
                 'aléoute' => 'ale',
                 'nyamwezi' => 'nym',
                 'Zuni' => 'zun',
                 'slavon liturgique' => 'chu',
                 'kiribati' => 'gil',
                 'swati' => 'ssw',
                 'Adygei' => 'ady',
                 'Latvian' => 'lav',
                 'athapascanes, langues' => 'ath',
                 'manobo, langues' => 'mno',
                 'tetum' => 'tet',
                 'mapuce' => 'arn',
                 'ojibwa' => 'oji',
                 'éwé' => 'ewe',
                 'Osage' => 'osa',
                 'latin' => 'lat',
                 'Sogdian' => 'sog',
                 'Egyptian (Ancient)' => 'egy',
                 'Duala' => 'dua',
                 'catalan' => 'cat',
                 'Cebuano' => 'ceb',
                 'irlandais ancien (jusqu\'à 900)' => 'sga',
                 'Bedawiyet' => 'bej',
                 'minangkabau' => 'min',
                 'Pushto' => 'pus',
                 'croate' => 'hrv',
                 'rajasthani' => 'raj',
                 'gallois' => 'wel',
                 'Chewa' => 'nya',
                 'Shona' => 'sna',
                 'maldivien' => 'div',
                 'Abkhazian' => 'abk',
                 'wolof' => 'wol',
                 'karakalpak' => 'kaa',
                 'polonais' => 'pol',
                 'Santali' => 'sat',
                 'ossète' => 'oss',
                 'Church Slavonic' => 'chu',
                 'Slave (Athapascan)' => 'den',
                 'bini' => 'bin',
                 'tonga (Nyasa)' => 'tog',
                 'Kalmyk' => 'xal',
                 'Basa' => 'bas',
                 'limbourgeois' => 'lim',
                 'Assamese' => 'asm',
                 'Italian' => 'ita',
                 'tuvalu' => 'tvl',
                 'sindhi' => 'snd',
                 'Irish, Middle (900-1200)' => 'mga',
                 'Sukuma' => 'suk',
                 'filipino' => 'fil',
                 'égyptien' => 'egy',
                 'langues paharis occidentales' => 'him',
                 'sorabes, langues' => 'wen',
                 'English' => 'eng',
                 'Mayan languages' => 'myn',
                 'Malagasy' => 'mlg',
                 'Yoruba' => 'yor',
                 'Slovene' => 'slv',
                 'oudmourte' => 'udm',
                 'adangme' => 'ada',
                 'Turkish' => 'tur',
                 'Panjabi' => 'pan',
                 'berbères, langues' => 'ber',
                 'Finno-Ugrian languages)' => 'fiu',
                 'haoussa' => 'hau',
                 'bambara' => 'bam',
                 'kawi' => 'kaw',
                 'German, Low' => 'nds',
                 'Rajasthani' => 'raj',
                 'hawaïen' => 'haw',
                 'acoli' => 'ach',
                 'assamais' => 'asm',
                 'somali' => 'som',
                 'Zenaga' => 'zen',
                 'Mossi' => 'mos',
                 'Kabardian' => 'kbd',
                 'hupa' => 'hup',
                 'Greek, Modern (1453-)' => 'gre',
                 'Kashmiri' => 'kas',
                 'norvégien nynorsk' => 'nno',
                 'rarotonga' => 'rar',
                 'Blissymbols' => 'zbl',
                 'Bokmål, Norwegian' => 'nob',
                 'Nyamwezi' => 'nym',
                 'Susu' => 'sus',
                 'Elamite' => 'elx',
                 'lituanien' => 'lit',
                 'Kashubian' => 'csb',
                 'espéranto' => 'epo',
                 'Sino-Tibetan languages' => 'sit',
                 'basa' => 'bas',
                 'n\'ko' => 'nqo',
                 'Aragonese' => 'arg',
                 'groenlandais' => 'kal',
                 'rapanui' => 'rap',
                 'Navaho' => 'nav',
                 'pachto' => 'pus',
                 'biélorusse' => 'bel',
                 'Bosnian' => 'bos',
                 'tamacheq' => 'tmh',
                 'Swati' => 'ssw',
                 'sami skolt' => 'sms',
                 'norvégien' => 'nor',
                 'yoruba' => 'yor',
                 'Low German' => 'nds',
                 'Papuan languages' => 'paa',
                 'Bamileke languages' => 'bai',
                 'gwich\'in' => 'gwi',
                 'Old Slavonic' => 'chu',
                 'sami d\'Inari' => 'smn',
                 'Limburger' => 'lim',
                 'Creoles and pidgins, English based' => 'cpe',
                 'kabyle' => 'kab',
                 'North Ndebele' => 'nde',
                 'otomi, langues' => 'oto',
                 'pilipino' => 'fil',
                 'manx' => 'glv',
                 'hiri motu' => 'hmo',
                 'anglo-saxon (ca.450-1100)' => 'ang',
                 'Nyankole' => 'nyn',
                 'Maltese' => 'mlt',
                 'Makasar' => 'mak',
                 'dogrib' => 'dgr',
                 'karatchai balkar' => 'krc',
                 'féroïen' => 'fao',
                 'Macedonian' => 'mac',
                 'Lezghian' => 'lez',
                 'Ndonga' => 'ndo',
                 'bantou, langues' => 'bnt',
                 'Konkani' => 'kok',
                 'Balinese' => 'ban',
                 'santal' => 'sat',
                 'Chuang' => 'zha',
                 'aceh' => 'ace',
                 'Tetum' => 'tet',
                 'oïrat' => 'xal',
                 'Lojban' => 'jbo',
                 'zhuang' => 'zha',
                 'mendé' => 'men',
                 'Multiple languages' => 'mul',
                 'Romany' => 'rom',
                 'Bihari languages' => 'bih',
                 'dinka' => 'din',
                 'Himachali languages' => 'him',
                 'Athapascan languages' => 'ath',
                 'Haitian Creole' => 'hat',
                 'indo-européennes, langues' => 'ine',
                 'Korean' => 'kor',
                 'Braj' => 'bra',
                 'corse' => 'cos',
                 'nzema' => 'nzi',
                 'Kazakh' => 'kaz',
                 'romanche' => 'roh',
                 'Marathi' => 'mar',
                 'arawak' => 'arw',
                 'nyoro' => 'nyo',
                 'Dutch' => 'dut',
                 'blin' => 'byn',
                 'Tibetan' => 'tib',
                 'caucasiennes, langues' => 'cau',
                 'Otomian languages' => 'oto',
                 'Hausa' => 'hau',
                 'Karachay-Balkar' => 'krc',
                 'langues biharis' => 'bih',
                 'Choctaw' => 'cho',
                 'Lahnda' => 'lah',
                 'chan' => 'shn',
                 'vaï' => 'vai'
               };
$DefaultRegion = {
                   'sv' => 'se',
                   'en' => 'us',
                   'af' => 'za'
                 };

sub iso639_TwoToThree{
    my $code=shift;
    $code=lc($code);
    if (exists $TwoToThree->{$code}){
        return $TwoToThree->{$code};
    }
    $code =~s/[\_\-].*$//;
    if (exists $TwoToThree->{$code}){
        return $TwoToThree->{$code};
    }
    return $code;
}

sub iso639_ThreeToTwo{
  my $id=shift;
    my $code=$id;
    $code=lc($code);
    if (exists $ThreeToTwo->{$code}){
        return $ThreeToTwo->{$code};
    }
    $code =~s/[\_\-].*$//;
    if (exists $ThreeToTwo->{$code}){
        return $ThreeToTwo->{$code};
    }
    return $id;
}

sub normalize_langtag{
    return iso639_AnyToTwo(@_);
#    return iso639_AnyToLangTag(@_);
}

sub iso639_DefaultRegion{
    my $lang = shift;
    $lang = lc($lang);
    if (exists $DefaultRegion->{$lang}){
        return $DefaultRegion->{$lang};
    }
    return uc($lang);  # this can be wrong if not all other mappings exist
}

sub iso639_AnyToLangTag{
    my $code=shift;

    # country/region code
    my $region=undef;
    if ($code =~s/[\_\-](.*)$//){
       $region = uc($1);
    }
    $code=lc($code);
    if (length($code) == 3){
      if (exists $ThreeToTwo->{$code}){
        $code = $ThreeToTwo->{$code};
      }
      else{
         # warn "unknown 3-letter language code $code\n!";
         ##
         ## leave the code or make it into 2 letters?!
         ## or find closest match?!?! or just produce an error and die?
         ##
      }
    }
    if (not defined $region){
       $region = iso639_DefaultRegion($code);
    }
    return $code."_".$region;
}

sub iso639_AnyToTwo{
    my $lang=shift;
    my $code=$lang;
    $code =~s/[\_\-](.*)$//;
    if (length($code) == 3){
      if (exists $ThreeToTwo->{$code}){
        $code = $ThreeToTwo->{$code};
        return lc($code);
      }
#      else{
#        warn "\ncannot find mapping from 3-letter-code $code to 2-letters!\n";
#      }
    }
    return $code if (exists $TwoToThree->{$code});
    return &iso639_NameToTwo($lang);
#    return lc($code);
}

sub iso639_ThreeToName{
    my $code=shift;
    $code=lc($code);
    if (exists $ThreeToName->{$code}){
        return $ThreeToName->{$code};
    }
    $code =~s/[\_\-].*$//;
    if (exists $ThreeToName->{$code}){
        return $ThreeToName->{$code};
    }
    return $code;
}

sub iso639_NameToThree {
    my $name = shift;
    if ( exists $NameToThree->{$name} ) {
        return $NameToThree->{$name};
    }
    my $new = ucfirst($name);                  # try with an upper-case letter
    if ( exists $NameToThree->{$new} ) {
        return $NameToThree->{$new};
    }
    return $name;
}

sub iso639_NameToTwo {
    return &iso639_ThreeToTwo( &iso639_NameToThree($_[0]) );
}

sub iso639_exists{
    my $code=shift;
    #$code =~s/[\_\-].*$//;    # remove region code
    $code =~s/\_[a-zA-Z0-9]{2,3}$//;    # remove region code
    return 1 if (exists $ThreeToName->{$code});
    return 1 if (exists $TwoToThree->{$code});
    return 0;
}

1;
