MDAllowedValueSets/src/MDLanguagesSet.php
Joshua Ramon Enslin f6257838b4
Use own name for languages rather than English one
For now this only comes for languages in which a translation of musdb
exists.
2022-11-17 18:32:07 +01:00

591 lines
16 KiB
PHP

<?PHP
/**
* Contains a class for controlling the list of available languages.
*
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
*/
declare(strict_types = 1);
/**
* Class containing static functions for getting available languages.
*/
final class MDLanguagesSet {
const AVAILABLE_LANGUAGES_SHORT = [
'aa',
'ab',
'ae',
'af',
'ak',
'am',
'an',
'ar',
'as',
'av',
'ay',
'az',
'ba',
'be',
'bg',
'bh',
'bi',
'bm',
'bn',
'bo',
'br',
'bs',
'ca',
'ce',
'ch',
'co',
'cr',
'cs',
'cu',
'cv',
'cy',
'da',
'de',
'dsb',
'dv',
'dz',
'ee',
'egy',
'el',
'en',
'eo',
'es',
'et',
'eu',
'fa',
'ff',
'fi',
'fj',
'fo',
'fr',
'fy',
'ga',
'gd',
'gl',
'gn',
'grc',
'gu',
'gv',
'ha',
'he',
'hi',
'ho',
'hr',
'hsb',
'ht',
'hu',
'hy',
'hz',
'ia',
'id',
'ie',
'ig',
'ii',
'ik',
'io',
'is',
'it',
'iu',
'ja',
'jv',
'ka',
'kg',
'ki',
'kj',
'kk',
'kl',
'km',
'kn',
'ko',
'kr',
'ks',
'ku',
'kv',
'kw',
'ky',
'la',
'lb',
'lg',
'li',
'ln',
'lo',
'lt',
'lu',
'lv',
'mg',
'mh',
'mi',
'mk',
'ml',
'mn',
'mr',
'ms',
'mt',
'my',
'na',
'nb',
'nd',
'ne',
'ng',
'nl',
'nn',
'no',
'nr',
'nv',
'ny',
'oc',
'oj',
'om',
'or',
'os',
'pa',
'pi',
'pl',
'ps',
'pt',
'qu',
'rm',
'rn',
'ro',
'ru',
'rw',
'sa',
'sc',
'sd',
'se',
'sg',
'si',
'sk',
'sl',
'sm',
'sn',
'so',
'sq',
'sr',
'ss',
'st',
'su',
'sv',
'sw',
'ta',
'te',
'tg',
'th',
'ti',
'tk',
'tl',
'tn',
'to',
'tr',
'ts',
'tt',
'tw',
'ty',
'ug',
'uk',
'ur',
'uz',
've',
'vi',
'vo',
'wa',
'wen',
'wo',
'xh',
'yi',
'yo',
'za',
'zh',
'zu',
];
const AVAILABLE_LANGUAGES = [
'aa' => 'Afar-áf',
'ab' => 'аҧсуа бызшәа',
'ae' => 'Avestan',
'af' => 'Afrikaans',
'ak' => 'Akan',
'am' => 'Amharic',
'an' => 'Aragonese',
'ar' => 'العربية',
'as' => 'Assamese',
'av' => 'Avaric',
'ay' => 'Aymara',
'az' => 'Azerbaijani',
'ba' => 'Bashkir',
'be' => 'беларуская мова',
'bg' => 'български език',
'bh' => 'Bihari',
'bi' => 'Bislama',
'bm' => 'Bambara',
'bn' => 'Bengali',
'bo' => 'བོད་སྐད',
'br' => 'Breton',
'bs' => 'Bosnian',
'ca' => 'català',
'ce' => 'Chechen',
'ch' => 'Chamorro',
'co' => 'Corsican',
'cr' => 'Cree',
'cs' => 'čeština',
'cu' => 'словѣньскъ ѩзыкъ',
'cv' => 'Chuvash',
'cy' => 'Welsh',
'da' => 'Danish',
'de' => 'Deutsch',
'dsb' => 'Dolnoserbšćina',
'dv' => 'Divehi; Dhivehi; Maldivian;',
'dz' => 'Dzongkha',
'ee' => 'Ewe',
'egy' => 'Egyptian language',
'el' => 'ελληνικά',
'en' => 'English',
'eo' => 'Esperanto',
'es' => 'Spanish; Castilian',
'et' => 'Estonian',
'eu' => 'Basque',
'fa' => 'Persian',
'ff' => 'Fula; Fulah; Pulaar; Pular',
'fi' => 'Finnish',
'fj' => 'Fijian',
'fo' => 'Faroese',
'fr' => 'Français',
'fy' => 'Western Frisian',
'ga' => 'Irish',
'gd' => 'Scottish Gaelic; Gaelic',
'gl' => 'Galician',
'gn' => 'Guaraní',
'grc' => 'Ancient Greek',
'gu' => 'Gujarati',
'gv' => 'Manx',
'ha' => 'Hausa',
'he' => 'Hebrew (modern)',
'hi' => 'Hindi',
'ho' => 'Hiri Motu',
'hr' => 'Croatian',
'hsb' => 'Hornjoserbšćina',
'ht' => 'Haitian; Haitian Creole',
'hu' => 'Magyar',
'hy' => 'Armenian',
'hz' => 'Herero',
'ia' => 'Interlingua',
'id' => 'Bahasa Indonesia',
'ie' => 'Interlingue',
'ig' => 'Igbo',
'ii' => 'Nuosu',
'ik' => 'Inupiaq',
'io' => 'Ido',
'is' => 'Icelandic',
'it' => 'Italian',
'iu' => 'Inuktitut',
'ja' => 'Japanese (ja)',
'jv' => 'Javanese (jv)',
'ka' => 'Georgian',
'kg' => 'Kongo',
'ki' => 'Kikuyu, Gikuyu',
'kj' => 'Kwanyama, Kuanyama',
'kk' => 'Kazakh',
'kl' => 'Kalaallisut, Greenlandic',
'km' => 'Khmer',
'kn' => 'Kannada',
'ko' => 'Korean',
'kr' => 'Kanuri',
'ks' => 'Kashmiri',
'ku' => 'Kurdish',
'kv' => 'Komi',
'kw' => 'Cornish',
'ky' => 'Kirghiz, Kyrgyz',
'la' => 'Latin',
'lb' => 'Lëtzebuergesch',
'lg' => 'Luganda',
'li' => 'Limburgish, Limburgan, Limburger',
'ln' => 'Lingala',
'lo' => 'Lao',
'lt' => 'lietuvių kalba',
'lu' => 'Luba-Katanga',
'lv' => 'Latvian',
'mg' => 'Malagasy',
'mh' => 'Marshallese',
'mi' => 'Maori',
'mk' => 'Macedonian',
'ml' => 'Malayalam',
'mn' => 'Mongolian',
'mr' => 'Marathi (Mara?hi)',
'ms' => 'Malay',
'mt' => 'Maltese',
'my' => 'Burmese',
'na' => 'Nauru',
'nb' => 'Bokmål',
'nd' => 'North Ndebele',
'ne' => 'Nepali',
'ng' => 'Ndonga',
'nl' => 'Nederlands',
'nn' => 'Nynorsk',
'no' => 'Norsk',
'nr' => 'South Ndebele',
'nv' => 'Navajo, Navaho',
'ny' => 'Chichewa; Chewa; Nyanja',
'oc' => 'Occitan',
'oj' => 'Ojibwe, Ojibwa',
'om' => 'Oromo',
'or' => 'Oriya',
'os' => 'Ossetian, Ossetic',
'pa' => 'Panjabi, Punjabi',
'pi' => 'Pali',
'pl' => 'Polski',
'ps' => 'Pashto, Pushto',
'pt' => 'Português',
'qu' => 'Quechua',
'rm' => 'Romansh',
'rn' => 'Kirundi',
'ro' => 'Română',
'ru' => 'Русский',
'rw' => 'Kinyarwanda',
'sa' => 'Sanskrit (संस्कृत)',
'sc' => 'Sardinian',
'sd' => 'Sindhi',
'se' => 'Northern Sami',
'sg' => 'Sango',
'si' => 'Sinhala, Sinhalese',
'sk' => 'Slovenčina',
'sl' => 'Slovenščina',
'sm' => 'Samoan',
'sn' => 'Shona',
'so' => 'Somali',
'sq' => 'Albanian',
'sr' => 'Serbian',
'ss' => 'Swati',
'st' => 'Southern Sotho',
'su' => 'Sundanese',
'sv' => 'Swedish',
'sw' => 'Swahili',
'ta' => 'Tamil',
'te' => 'Telugu',
'tg' => 'Tajik',
'th' => 'ภาษาไทย',
'ti' => 'Tigrinya',
'tk' => 'Turkmen',
'tl' => 'Tagalog',
'tn' => 'Tswana',
'to' => 'Tonga (Tonga Islands)',
'tr' => 'Türkçe',
'ts' => 'Tsonga',
'tt' => 'Tatar',
'tw' => 'Twi',
'ty' => 'Tahitian',
'ug' => 'Uighur, Uyghur',
'uk' => 'Українська',
'ur' => 'اردو',
'uz' => 'Uzbek',
've' => 'Venda',
'vi' => 'Vietnamese',
'vo' => 'Volapük',
'wa' => 'Walloon',
'wen' => 'Sorbisch',
'wo' => 'Wolof',
'xh' => 'Xhosa',
'yi' => 'Yiddish',
'yo' => 'Yoruba',
'za' => 'Zhuang, Chuang',
'zh' => 'Chinese',
'zu' => 'Zulu',
];
const LANGUAGES_ISO639_2B = [
'aa' => 'aar', # 'Afar-áf',
'ab' => 'abk', # 'аҧсуа бызшәа',
'ae' => 'ave', # 'Avestan',
'af' => 'afr', # 'Afrikaans',
'ak' => 'aka', # 'Akan',
'am' => 'amh', # 'Amharic',
'an' => 'arg', # 'Aragonese',
'ar' => 'ara', # 'العربية',
'as' => 'asm', # 'Assamese',
'av' => 'ava', # 'Avaric',
'ay' => 'aym', # 'Aymara',
'az' => 'aze', # 'Azerbaijani',
'ba' => 'bak', # 'Bashkir',
'be' => 'bel', # 'беларуская мова',
'bg' => 'bul', # 'български език',
'bh' => 'bih', # 'Bihari',
'bi' => 'bis', # 'Bislama',
'bm' => 'bam', # 'Bambara',
'bn' => 'ben', # 'Bengali',
'bo' => 'tib', # 'བོད་སྐད',
'br' => 'bre', # 'Breton',
'bs' => 'bos', # 'Bosnian',
'ca' => 'cat', # 'català',
'ce' => 'che', # 'Chechen',
'ch' => 'cha', # 'Chamorro',
'co' => 'cos', # 'Corsican',
'cr' => 'cre', # 'Cree',
'cs' => 'cze', # 'čeština',
'cu' => 'chu', # 'словѣньскъ ѩзыкъ',
'cv' => 'chv', # 'Chuvash',
'cy' => 'wel', # 'Welsh',
'da' => 'dan', # 'Danish',
'de' => 'ger', # 'Deutsch',
'dsb' => 'dsb', # 'Dolnoserbšćina',
'dv' => 'div', # 'Divehi; Dhivehi; Maldivian;',
'dz' => 'dzo', # 'Dzongkha',
'ee' => 'ewe', # 'Ewe',
'egy' => 'egy', # 'Egyptian language',
'el' => 'gre', # 'ελληνικά',
'en' => 'eng', # 'English',
'eo' => 'epo', # 'Esperanto',
'es' => 'spa', # 'Spanish; Castilian',
'et' => 'est', # 'Estonian',
'eu' => 'baq', # 'Basque',
'fa' => 'per', # 'Persian',
'ff' => 'ful', # 'Fula; Fulah; Pulaar; Pular',
'fi' => 'fin', # 'Finnish',
'fj' => 'fij', # 'Fijian',
'fo' => 'fao', # 'Faroese',
'fr' => 'fre', # 'French',
'fy' => 'fry', # 'Western Frisian',
'ga' => 'gle', # 'Irish',
'gd' => 'gla', # 'Scottish Gaelic; Gaelic',
'gl' => 'glg', # 'Galician',
'gn' => 'grn', # 'Guaraní',
'grc' => 'grc', # 'Ancient Greek',
'gu' => 'guj', # 'Gujarati',
'gv' => 'glv', # 'Manx',
'ha' => 'hau', # 'Hausa',
'he' => 'heb', # 'Hebrew (modern)',
'hi' => 'hin', # 'Hindi',
'ho' => 'hmo', # 'Hiri Motu',
'hr' => 'hrv', # 'Croatian',
'hsb' => 'hsb', # 'Hornjoserbšćina',
'ht' => 'hat', # 'Haitian; Haitian Creole',
'hu' => 'hun', # 'Magyar',
'hy' => 'arm', # 'Armenian',
'hz' => 'her', # 'Herero',
'ia' => 'ina', # 'Interlingua',
'id' => 'ind', # 'Bahasa Indonesia',
'ie' => 'ile', # 'Interlingue',
'ig' => 'ibo', # 'Igbo',
'ii' => 'iii', # 'Nuosu',
'ik' => 'ipk', # 'Inupiaq',
'io' => 'ido', # 'Ido',
'is' => 'ice', # 'Icelandic',
'it' => 'ita', # 'Italian',
'iu' => 'iku', # 'Inuktitut',
'ja' => 'jpn', # 'Japanese (ja)',
'jv' => 'jav', # 'Javanese (jv)',
'ka' => 'geo', # 'Georgian',
'kg' => 'kon', # 'Kongo',
'ki' => 'kik', # 'Kikuyu, Gikuyu',
'kj' => 'kua', # 'Kwanyama, Kuanyama',
'kk' => 'kaz', # 'Kazakh',
'kl' => 'kal', # 'Kalaallisut, Greenlandic',
'km' => 'khm', # 'Khmer',
'kn' => 'kan', # 'Kannada',
'ko' => 'kor', # 'Korean',
'kr' => 'kau', # 'Kanuri',
'ks' => 'kas', # 'Kashmiri',
'ku' => 'kur', # 'Kurdish',
'kv' => 'kom', # 'Komi',
'kw' => 'cor', # 'Cornish',
'ky' => 'kir', # 'Kirghiz, Kyrgyz',
'la' => 'lat', # 'Latin',
'lb' => 'ltz', # 'Lëtzebuergesch',
'lg' => 'lug', # 'Luganda',
'li' => 'lim', # 'Limburgish, Limburgan, Limburger',
'ln' => 'lin', # 'Lingala',
'lo' => 'lao', # 'Lao',
'lt' => 'lit', # 'lietuvių kalba',
'lu' => 'lub', # 'Luba-Katanga',
'lv' => 'lav', # 'Latvian',
'mg' => 'mlg', # 'Malagasy',
'mh' => 'mah', # 'Marshallese',
'mi' => 'mao', # 'Maori',
'mk' => 'mac', # 'Macedonian',
'ml' => 'mal', # 'Malayalam',
'mn' => 'mon', # 'Mongolian',
'mr' => 'mar', # 'Marathi (Mara?hi)',
'ms' => 'may', # 'Malay',
'mt' => 'mlt', # 'Maltese',
'my' => 'bur', # 'Burmese',
'na' => 'nau', # 'Nauru',
'nb' => 'nob', # 'Bokmål',
'nd' => 'nde', # 'North Ndebele',
'ne' => 'nep', # 'Nepali',
'ng' => 'ndo', # 'Ndonga',
'nl' => 'dut', # 'Nederlands',
'nn' => 'nno', # 'Nynorsk',
'no' => 'nor', # 'Norsk',
'nr' => 'nbl', # 'South Ndebele',
'nv' => 'nav', # 'Navajo, Navaho',
'ny' => 'nya', # 'Chichewa; Chewa; Nyanja',
'oc' => 'oci', # 'Occitan',
'oj' => 'oji', # 'Ojibwe, Ojibwa',
'om' => 'orm', # 'Oromo',
'or' => 'ori', # 'Oriya',
'os' => 'oss', # 'Ossetian, Ossetic',
'pa' => 'pan', # 'Panjabi, Punjabi',
'pi' => 'pli', # 'Pali',
'pl' => 'pol', # 'Polish',
'ps' => 'pus', # 'Pashto, Pushto',
'pt' => 'por', # 'Português',
'qu' => 'que', # 'Quechua',
'rm' => 'roh', # 'Romansh',
'rn' => 'run', # 'Kirundi',
'ro' => 'rum', # 'Română',
'ru' => 'rus', # 'Russian',
'rw' => 'kin', # 'Kinyarwanda',
'sa' => 'san', # 'Sanskrit (संस्कृत)',
'sc' => 'srd', # 'Sardinian',
'sd' => 'snd', # 'Sindhi',
'se' => 'sme', # 'Northern Sami',
'sg' => 'sag', # 'Sango',
'si' => 'sin', # 'Sinhala, Sinhalese',
'sk' => 'slo', # 'Slovenčina',
'sl' => 'slv', # 'Slovenščina',
'sm' => 'smo', # 'Samoan',
'sn' => 'sna', # 'Shona',
'so' => 'som', # 'Somali',
'sq' => 'alb', # 'Albanian',
'sr' => 'srp', # 'Serbian',
'ss' => 'ssw', # 'Swati',
'st' => 'sot', # 'Southern Sotho',
'su' => 'sun', # 'Sundanese',
'sv' => 'swe', # 'Swedish',
'sw' => 'swa', # 'Swahili',
'ta' => 'tam', # 'Tamil',
'te' => 'tel', # 'Telugu',
'tg' => 'tgk', # 'Tajik',
'th' => 'tha', # 'ภาษาไทย',
'ti' => 'tir', # 'Tigrinya',
'tk' => 'tuk', # 'Turkmen',
'tl' => 'tgl', # 'Tagalog',
'tn' => 'tsn', # 'Tswana',
'to' => 'ton', # 'Tonga (Tonga Islands)',
'tr' => 'tur', # 'Türkçe',
'ts' => 'tso', # 'Tsonga',
'tt' => 'tat', # 'Tatar',
'tw' => 'twi', # 'Twi',
'ty' => 'tah', # 'Tahitian',
'ug' => 'uig', # 'Uighur, Uyghur',
'uk' => 'ukr', # 'Ukrainian',
'ur' => 'urd', # 'اردو',
'uz' => 'uzb', # 'Uzbek',
've' => 'ven', # 'Venda',
'vi' => 'vie', # 'Vietnamese',
'vo' => 'vol', # 'Volapük',
'wa' => 'wln', # 'Walloon',
'wen' => 'wen', # 'Sorbisch',
'wo' => 'wol', # 'Wolof',
'xh' => 'xho', # 'Xhosa',
'yi' => 'yid', # 'Yiddish',
'yo' => 'yor', # 'Yoruba',
'za' => 'zha', # 'Zhuang, Chuang',
'zh' => 'chi', # 'Chinese',
'zu' => 'zul', # 'Zulu',
];
}