Skip to content

Commit

Permalink
Merge pull request #570 from malard/langmap
Browse files Browse the repository at this point in the history
added: comprehensive language map, so subtitle language names should be correct
  • Loading branch information
malard committed Jan 29, 2024
2 parents 41d3200 + dc44f81 commit 7f3204d
Showing 1 changed file with 188 additions and 20 deletions.
208 changes: 188 additions & 20 deletions src/js/helpers/streams.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ helpers.stream.audioChannelMap = [
{
channels: 6
label: '5.1'
},
{
channels:7
label: '6.1'
}
{
channels: 8
Expand All @@ -63,27 +67,191 @@ helpers.stream.audioChannelMap = [
}
]

## Map for language codes, TODO: Add more maps
## Map for language codes (using https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes Set 2/B)
helpers.stream.langMap =
'eng': 'English'
'und': 'Unknown'
'bul': 'Bulgaria'
'ara': 'Arabic'
'zho': 'Chinese'
'ces': 'Czech'
'dan': 'Danish'
'nld': 'Netherlands'
'fin': 'Finish'
'fra': 'French'
'deu': 'German'
'nor': 'Norwegian'
'pol': 'Polish'
'por': 'Portuguese'
'ron': 'Romanian'
'spa': 'Spanish'
'swe': 'Swedish'
'tur': 'Turkish'
'vie': 'Vietnamese'
'und': 'Unknown'
'Afar': 'aar'
'Abkhazian': 'abk'
'Afrikaans': 'afr'
'Akan': 'aka'
'Albanian': 'alb'
'Amharic': 'amh'
'Arabic': 'ara'
'Aragonese': 'arg'
'Armenian': 'arm'
'Assamese': 'asm'
'Avaric': 'ava'
'Avestan': 'ave'
'Aymara': 'aym'
'Azerbaijani': 'aze'
'Bashkir': 'bak'
'Bambara': 'bam'
'Basque': 'baq'
'Belarusian': 'bel'
'Bengali': 'ben'
'Bislama': 'bis'
'Bosnian': 'bos'
'Breton': 'bre'
'Bulgarian': 'bul'
'Burmese': 'bur'
'Catalan': 'cat'
'Chamorro': 'cha'
'Chechen': 'che'
'Chinese': 'chi'
'Chuvash': 'chv'
'Cornish': 'cor'
'Corsican': 'cos'
'Cree': 'cre'
'Czech': 'cze'
'Danish': 'dan'
'Maldivian': 'div'
'Dutch': 'dut'
'Dzongkha': 'dzo'
'English': 'eng'
'Esperanto': 'epo'
'Estonian': 'est'
'Ewe': 'ewe'
'Faroese': 'fao'
'Fijian': 'fij'
'Finnish': 'fin'
'French': 'fre'
'Western Frisian': 'fry'
'Fulah': 'ful'
'Georgian': 'geo'
'German': 'ger'
'Gaelic': 'gla'
'Irish': 'gle'
'Galician': 'glg'
'Manx': 'glv'
'Greek': 'gre'
'Guarani': 'grn'
'Gujarati': 'guj'
'Haitian': 'hat'
'Hausa': 'hau'
'Hebrew': 'heb'
'Herero': 'her'
'Hindi': 'hin'
'Hiri Motu': 'hmo'
'Croatian': 'hrv'
'Hungarian': 'hun'
'Igbo': 'ibo'
'Icelandic': 'ice'
'Ido': 'ido'
'Sichuan Yi': 'iii'
'Inuktitut': 'iku'
'Interlingue': 'ile'
'Interlingua': 'ina'
'Indonesian': 'ind'
'Inupiaq': 'ipk'
'Italian': 'ita'
'Javanese': 'jav'
'Japanese': 'jpn'
'Kalaallisut': 'kal'
'Kannada': 'kan'
'Kashmiri': 'kas'
'Kanuri': 'kau'
'Kazakh': 'kaz'
'Central Khmer': 'khm'
'Kikuyu': 'kik'
'Kinyarwanda': 'kin'
'Kirghiz': 'kir'
'Komi': 'kom'
'Kongo': 'kon'
'Korean': 'kor'
'Kuanyama': 'kua'
'Kurdish': 'kur'
'Lao': 'lao'
'Latin': 'lat'
'Latvian': 'lav'
'Limburgish': 'lim'
'Lingala': 'lin'
'Lithuanian': 'lit'
'Luxembourgish': 'ltz'
'Luba-Katanga': 'lub'
'Ganda': 'lug'
'Macedonian': 'mac'
'Marshallese': 'mah'
'Malayalam': 'mal'
'Maori': 'mao'
'Marathi': 'mar'
'Malay': 'may'
'Malagasy': 'mlg'
'Maltese': 'mlt'
'Mongolian': 'mon'
'Nauru': 'nau'
'Navajo': 'nav'
'South Ndebele': 'nbl'
'North Ndebele': 'nde'
'Ndonga': 'ndo'
'Nepali': 'nep'
'Norwegian Nynorsk': 'nno'
'Norwegian Bokmål': 'nob'
'Norwegian': 'nor'
'Chichewa': 'nya'
'Occitan': 'oci'
'Ojibwa': 'oji'
'Oriya': 'ori'
'Oromo': 'orm'
'Ossetian': 'oss'
'Punjabi': 'pan'
'Persian': 'per'
'Pali': 'pli'
'Polish': 'pol'
'Portuguese': 'por'
'Pashto': 'pus'
'Quechua': 'que'
'Romansh': 'roh'
'Romanian': 'rum'
'Rundi': 'run'
'Russian': 'rus'
'Sango': 'sag'
'Sanskrit': 'san'
'Sinhalese': 'sin'
'Slovak': 'slo'
'Slovenian': 'slv'
'Northern Sami': 'sme'
'Samoan': 'smo'
'Shona': 'sna'
'Sindhi': 'snd'
'Somali': 'som'
'Southern Sotho': 'sot'
'Spanish': 'spa'
'Sardinian': 'srd'
'Serbian': 'srp'
'Swati': 'ssw'
'Sundanese': 'sun'
'Swahili': 'swa'
'Swedish': 'swe'
'Tahitian': 'tah'
'Tamil': 'tam'
'Tatar': 'tat'
'Telugu': 'tel'
'Tajik': 'tgk'
'Tagalog': 'tgl'
'Thai': 'tha'
'Tibetan': 'tib'
'Tigrinya': 'tir'
'Tonga': 'ton'
'Tswana': 'tsn'
'Tsonga': 'tso'
'Turkmen': 'tuk'
'Turkish': 'tur'
'Twi': 'twi'
'Uighur': 'uig'
'Ukrainian': 'ukr'
'Urdu': 'urd'
'Uzbek': 'uzb'
'Venda': 'ven'
'Vietnamese': 'vie'
'Volapük': 'vol'
'Welsh': 'wel'
'Walloon': 'wln'
'Wolof': 'wol'
'Xhosa': 'xho'
'Yiddish': 'yid'
'Yoruba': 'yor'
'Zhuang': 'zha'
'Zulu': 'zul'


###
Expand Down

1 comment on commit 7f3204d

@malard
Copy link
Contributor Author

@malard malard commented on 7f3204d Mar 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i've just realised this is inverted!

Please sign in to comment.