User:Mitterertux/sidebartranslate.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
Documentation for this user script can be added at User:Mitterertux/sidebartranslate. |
/////////////////////////////////////////////////////////////////////////
// English translation for languages in the "in other languages" list //
// Note: does not translate all languages //
// //
// Modified version made by Mitterertux //
// Based on a script made by Tra //
// (bug fix by Voice_of_All) //
/////////////////////////////////////////////////////////////////////////
function languagereplace () {
if (document.getElementById('p-lang')) {
var LangNodes=document.getElementById('p-lang').getElementsByTagName('ul')[0].getElementsByTagName('li');
for( var x = 0; x < LangNodes.length; x++ ) {
LangNodes[x].getElementsByTagName('a')[0].innerHTML = localtoEnglish(LangNodes[x].getElementsByTagName('a')[0].innerHTML);
}
}
}
$ (languagereplace)
function localtoEnglish(localname) {
switch (localname) {
case 'Deutsch': return 'Deutsch - German'; break;
case 'Français': return 'Français - French'; break;
case 'Polski': return 'Polski - Polish'; break;
case '日本語': return '日本語 - Japanese'; break;
case 'Nederlands': return 'Nederlands - Dutch'; break;
case 'Italiano': return 'Italiano - Italian'; break;
case 'Português': return 'Português - Portuguese'; break;
case 'Svenska': return 'Svenska - Swedish'; break;
case 'Español': return 'Español - Spanish'; break;
case 'Русский': return 'Русский - Russian'; break;
case '中文': return '中文 - Chinese'; break;
case 'Suomi': return 'Suomi - Finnish'; break;
case 'Norsk (bokmål)': return 'Norsk (bokmål)- Norwegian (bokmål)'; break;
case 'Norsk (nynorsk)': return 'Norsk (nynorsk) - Norwegian (nynorsk)'; break;
case 'Esperanto': return 'Esperanto'; break;
case 'Slovenčina': return 'Slovenčina - Slovak'; break;
case 'Dansk': return 'Dansk - Danish'; break;
case 'Česky': return 'Česky - Czech'; break;
case 'עברית': return 'עברית - Hebrew'; break;
case 'Català': return 'Català - Catalan'; break;
case 'Magyar': return 'Magyar - Hungarian'; break;
case 'Bahasa Indonesia': return 'Indonesia - Indonesian'; break;
case 'Română': return 'Română - Romanian'; break;
case 'Українська': return 'Українська - Ukrainian'; break;
case 'Српски / Srpski': return 'Српски - Serbian'; break;
case 'Türkçe': return 'Türkçe - Turkish'; break;
case 'Slovenščina': return 'Slovenščina - Slovenian'; break;
case 'Lietuvių': return 'Lietuvių - Lithuanian'; break;
case 'Български': return 'Български - Bulgarian'; break;
case '한국어': return '한국어 - Korean'; break;
case 'Eesti': return 'Eesti - Estonian'; break;
case 'Hrvatski': return 'Hrvatski - Croatian'; break;
case 'తెలుగు': return 'తెలుగు - Telugu'; break;
case 'العربية': return 'العربية - Arabic'; break;
case 'Galego': return 'Galego - Galician'; break;
case 'Norsk (nynorsk)': return 'Norsk (nynorsk) - Norwegian (Nynorsk)'; break;
case 'ไทย': return 'ไทย - Thai'; break;
case 'فارسی': return 'فارسی - Persian'; break;
case 'Ελληνικά': return 'Ελληνικά - Greek'; break;
case 'Bahasa Melayu': return 'Melayu - Malay'; break;
case 'Euskara': return 'Euskara - Basque'; break;
case 'Ido': return 'Ido'; break;
case 'Nnapulitano': return 'Nnapulitano - Neapolitan'; break;
case 'বাংলা': return 'বাংলা - Bengali'; break;
case 'Íslenska': return 'Íslenska - Icelandic'; break;
case 'ქართული': return 'ქართული - Georgian'; break;
case 'Simple English': return 'Simple English'; break;
case 'Tiếng Việt': return 'Tiếng Việt - Vietnamese'; break;
case 'Bosanski': return 'Bosanski - Bosnian'; break;
case 'Lëtzebuergesch': return 'Lëtzebuergesch - Luxembourgish'; break;
case 'Brezhoneg': return 'Brezhoneg - Breton'; break;
case 'Shqip': return 'Shqip - Albanian'; break;
case 'Македонски': return 'Македонски - Macedonian'; break;
case 'Walon': return 'Walon - Walloon'; break;
case 'Srpskohrvatski / Српскохрватски': return 'Srpskohrvatski / Српскохрватски - Serbo-Croatian'; break;
case 'Latina': return 'Latina - Latin'; break;
case 'Krèyol ayisyen': return 'Krèyol ayisyen - Haitian'; break;
case 'Sicilianu': return 'Sicilianu - Sicilian'; break;
case 'Kurdî / كوردی': return 'Kurdî - Kurdish'; break;
case 'Сибирской': return 'Сибирской - Siberian'; break;
case 'Latviešu': return 'Latviešu - Latvian'; break;
case 'मराठी': return 'मराठी - Marathi'; break;
case 'Asturianu': return 'Asturianu - Asturian'; break;
case 'Afrikaans': return 'Afrikaans'; break;
case 'Basa Sunda': return 'Basa Sunda - Sundanese'; break;
case 'Occitan': return 'Occitan'; break;
case 'Ripoarisch': return 'Ripoarisch - Ripuarian'; break;
case 'Беларуская': return 'Беларуская - Belarusian'; break;
case 'Cymraeg': return 'Cymraeg - Welsh'; break;
case 'Tagalog': return 'Tagalog'; break;
case 'O\'zbek': return 'O\'zbek - Uzbek'; break;
case 'தமிழ்': return 'தமிழ் - Tamil'; break;
case 'Corsu': return 'Corsu - Corsican'; break;
case 'Aragonés': return 'Aragonés - Aragonese'; break;
case 'Чăвашла': return 'Чăвашла - Chuvash'; break;
case 'ಕನ್ನಡ': return 'ಕನ್ನಡ - Kannada'; break;
case 'Gàidhlig': return 'Gàidhlig - Gaelic (Scotland)'; break;
case 'Gaeilge': return 'Gaeilge - Gaelic (Ireland)'; break;
case 'Tatarça/Татарча': return 'Tatar'; break;
case 'Azərbaycan': return 'Azeri'; break;
case 'Vèneto': return 'Venetian'; break;
case 'हिन्दी': return 'Hindi'; break;
case 'Basa Jawa': return 'Javanese'; break;
case 'Тоҷикӣ': return 'Tajik'; break;
case 'Frysk': return 'West Frisian'; break;
case 'اردو': return 'Urdu'; break;
case 'Interlingua': return 'Interlingua'; break;
case 'Plattdüütsch': return 'Low Saxon'; break;
case 'Lumbaart': return 'Lombard'; break;
case 'Alemannisch': return 'Alemannic'; break;
case 'Հայերեն': return 'Armenian'; break;
case 'Limburgs': return 'Limburgian'; break;
case 'ייִדיש': return 'Yiddish'; break;
case 'Kiswahili': return 'Swahili'; break;
case 'Bân-lâm-gú': return 'Min Nan'; break;
case 'Ilokano': return 'Ilokano'; break;
case 'Føroyskt': return 'Faroese'; break;
case 'Piemontèis': return 'Piedmontese'; break;
case 'Nouormand': return 'Norman'; break;
case 'Arpitan': return 'Franco-Provençal/Arpitan'; break;
case 'Winaray': return 'Waray-Waray'; break;
case 'Scots': return 'Scots'; break;
case 'Kapampangan': return 'Kapampangan'; break;
case 'Иронау': return 'Ossetian'; break;
case 'Furlan': return 'Friulian'; break;
case 'Cebuano': return 'Cebuano'; break;
case '粵語': return 'Cantonese'; break;
case 'Nedersaksisch': return 'Dutch Low Saxon'; break;
case 'മലയാളം': return 'Malayalam'; break;
case 'Kernewek': return 'Cornish'; break;
case 'Deitsch': return 'Pennsylvania German'; break;
case 'नेपाल भाषा': return 'Newar / Nepal Bhasa'; break;
case 'Uyghurche / ئۇيغۇرچە': return 'Uighur'; break;
case 'Líguru': return 'Ligurian'; break;
case 'Novial': return 'Novial'; break;
case 'Basa Banyumasan': return 'Banyumasan'; break;
case 'Sámegiella': return 'Northern Sami'; break;
case 'Ladino': return 'Ladino'; break;
case 'Kaszëbsczi': return 'Kashubian'; break;
case 'Malti': return 'Maltese'; break;
case 'Volapük': return 'Volapük'; break;
case 'አማርኛ': return 'Amharic'; break;
case 'Anglo Saxon': return 'Anglo-Saxon'; break;
case 'پښتو': return 'Pashto'; break;
case 'West-Vlaoms': return 'West Flemish'; break;
case 'संस्कृत': return 'Sanskrit'; break;
case 'Žemaitėška': return 'Samogitian'; break;
case 'Võro': return 'Voro'; break;
case 'Māori': return 'Maori'; break;
case 'Zazaki': return 'Zazaki'; break;
case 'Runa Simi': return 'Quechua'; break;
case 'Молдовеняскэ': return 'Moldovan'; break;
case 'Reo Mā`ohi': return 'Tahitian'; break;
case 'Монгол': return 'Mongolian'; break;
case 'Lojban': return 'Lojban'; break;
case 'कश्मीरी - (كشميري)': return 'Kashmiri'; break;
case 'Nahuatl': return 'Nahuatl'; break;
case 'Türkmen': return 'Turkmen'; break;
case 'Tok Pisin': return 'Tok Pisin'; break;
case 'Interlingue': return 'Interlingue'; break;
case 'Кыргызча': return 'Kirghiz'; break;
case 'नेपाली': return 'Nepali'; break;
case 'Rumantsch': return 'Romansh'; break;
case 'ܕܥܒܪܸܝܛ': return 'Assyrian Neo-Aramaic'; break;
case 'Toki Pona': return 'Tokipona'; break;
case 'Lingala': return 'Lingala'; break;
case 'Ekakairũ Naoero': return 'Nauruan'; break;
case 'faka-Tonga': return 'Tongan'; break;
case 'Қазақша': return 'Kazakh'; break;
case 'Armâneashti': return 'Aromanian'; break;
case 'Удмурт': return 'Udmurt'; break;
case 'Wollof': return 'Wolof'; break;
case 'ગુજરાતી': return 'Gujarati'; break;
case 'Malagasy': return 'Malagasy'; break;
case 'བོད་ཡིག': return 'Tibetan'; break;
case 'Tetun': return 'Tetum'; break;
case 'ދިވެހިބަސް': return 'Divehi'; break;
case '文言': return 'Classical Chinese'; break;
case 'Romani': return 'Romani'; break;
case 'Sardu': return 'Sardinian'; break;
case 'Авар': return 'Avar'; break;
case 'Gaelg': return 'Manx'; break;
case 'Kongo': return 'Kongo'; break;
case '吴语': return 'Wu'; break;
case 'Pangasinan': return 'Pangasinan'; break;
case 'Башҡорт': return 'Bashkir'; break;
case 'ᏣᎳᎩ': return 'Cherokee'; break;
case 'සිංහල': return 'Sinhalese'; break;
case 'Bamanankan': return 'Bambara'; break;
case 'سنڌي': return 'Sindhi'; break;
case '𐌲𐌿𐍄𐌹𐍃𐌺': return 'Gothic'; break;
case 'Emilià': return 'Emilian-Romagnol'; break;
case 'Hornjoserbsce': return 'Upper Sorbian'; break;
case 'ភាសាខ្មែរ': return 'Khmer'; break;
case 'Gagana Samoa': return 'Samoan'; break;
case 'isiZulu': return 'Zulu'; break;
case 'Boarisch': return 'Bavarian'; break;
case 'ᐃᓄᒃᑎᑐᑦ/inuktitut': return 'Inuktitut'; break;
case 'Myanmasa': return 'Burmese'; break;
case 'Diné bizaad': return 'Navajo'; break;
case 'Словѣ́ньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ': return 'Old Church Slavonic'; break;
case 'Yorùbá': return 'Yoruba'; break;
case 'Kalaallisut': return 'Greenlandic'; break;
case 'Аҧсуа': return 'Abkhazian'; break;
case 'Hawai`i': return 'Hawaiian'; break;
case 'ລາວ': return 'Lao'; break;
case 'ਪੰਜਾਬੀ': return 'Punjabi'; break;
case 'Soomaaliga': return 'Somali'; break;
case 'Mìng-dĕ̤ng-ngṳ̄': return 'Min Dong'; break;
case 'seSotho': return 'Sesotho'; break;
case 'ইমার ঠার/বিষ্ণুপ্রিয়া মণিপুরী': return 'Bishnupriya Manipuri'; break;
case 'Papiamentu': return 'Papiamentu'; break;
case 'Avañe\'ẽ': return 'Guarani'; break;
case 'Aymar': return 'Aymara'; break;
case 'Kinyarwanda': return 'Kinyarwanda'; break;
case 'گیلکی': return 'Gilaki'; break;
case 'Zeêuws': return 'Zealandic'; break;
case 'isiXhosa': return 'Xhosan'; break;
case 'Na Vosa Vakaviti': return 'Fijian'; break;
case 'Bislama': return 'Bislama'; break;
case 'Коми': return 'Komi'; break;
case 'Tarandíne': return 'Tarantino'; break;
case 'Хальмг': return 'Kalmyk'; break;
case 'पािऴ': return 'Pali'; break;
case 'Setswana': return 'Tswana'; break;
case '(Cuengh)': return 'Zhuang'; break;
case 'Kanuri': return 'Kanuri'; break;
case 'Нохчийн': return 'Chechen'; break;
case 'Zamboangueño': return 'Zamboanga Chavacano'; break;
case 'هَوُسَ': return 'Hausa'; break;
case 'chiTumbuka': return 'Tumbuka'; break;
case 'Fulfulde': return 'Peul'; break;
case 'Twi': return 'Twi'; break;
case 'Igbo': return 'Igbo'; break;
case 'Nēhiyawēwin / ᓀᐦᐃᔭᐍᐏᐣ': return 'Cree'; break;
case 'ꆇꉙ': return 'Sichuan Yi'; break;
case 'Iñupiak': return 'Inupiak'; break;
case 'Kirundi': return 'Kirundi'; break;
case 'Luganda': return 'Luganda'; break;
case 'Afar': return 'Afar'; break;
case 'Sängö': return 'Sango'; break;
case 'Oromoo': return 'Oromo'; break;
case 'Chi-Chewa': return 'Chichewa'; break;
case 'chiShona': return 'Shona'; break;
case 'Hiri Motu': return 'Hiri Motu'; break;
case 'Akana': return 'Akan'; break;
case 'Norfuk / Pitkern': return 'Norfolk'; break;
case 'ᨅᨔ ᨕᨘᨁᨗ': return 'Buginese'; break;
case 'অসমীয়া': return 'Assamese'; break;
case 'Xitsonga': return 'Tsonga'; break;
case 'Eʋegbe': return 'Ewe'; break;
case 'Gĩkũyũ': return 'Kikuyu'; break;
case 'Kuanyama': return 'Kuanyama'; break;
case 'Tsetsêhestâhese': return 'Cheyenne'; break;
case 'Otsiherero': return 'Herero'; break;
case 'Ebon': return 'Marshallese'; break;
case 'भोजपुरी': return 'Bihari'; break;
case 'ትግርኛ': return 'Tigrinya'; break;
case 'Oshiwambo': return 'Ndonga'; break;
case 'Tshivenda': return 'Venda'; break;
case 'ଓଡ଼ିଆ': return 'Oriya'; break;
case 'SiSwati': return 'Swati'; break;
case 'Chamoru': return 'Chamorro'; break;
case 'Choctaw': return 'Choctaw'; break;
case 'Muscogee': return 'Muscogee'; break;
case 'Буряад': return 'Buryat (Russia)'; break;
case 'ཇོང་ཁ': return 'Dzongkha'; break;
case 'مَزِروني': return 'Mazandarani'; break;
case 'Лакку': return 'Lak'; break;
case 'ܐܪܡܝܐ': return 'Aramaic'; break;
case 'Kreyòl ayisyen': return 'Haitian Creole'; break;
case 'Беларуская (тарашкевіца)': return 'Belarusian (Tarashkevitsa)'; break;
case 'Armãneashce': return 'Aromanian'; break;
case 'Hak-kâ-fa': return 'Hakka Chinese'; break;
case 'Мокшень': return 'Moksha'; break;
case 'Qırımtatarca': return 'Crimean Tatar'; break;
case 'Ślůnski': return 'Silesian'; break;
case 'Seeltersk': return 'Saterland Frisian'; break;
case 'Dolnoserbski': return 'Lower Sorbian'; break;
case 'Саха тыла': return 'Sakha'; break;
case '贛語': return 'Gan Chinese'; break;
case 'Estremeñu': return 'Extremaduran'; break;
case 'Newar / Nepal Bhasa': return 'Nepal Bhasa'; break;
case 'Taqbaylit': return 'Kabyle'; break;
case 'မြန်မာဘာသာ': return 'Burmese'; break;
case 'مصرى': return 'Egyptian Arabic'; break;
case 'Aymar aru': return 'Aymara'; break;
case 'Чӑвашла': return 'Chuvash'; break;
case 'Qaraqalpaqsha': return 'Karakalpak'; break;
case 'Ποντιακά': return 'Pontic'; break;
case 'Эрзянь' : return 'Erzya'; break;
default: return localname;
}
}