Module:Languages

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Lua

CodeDiscussionEditHistoryLinksLink count Subpages:DocumentationTestsResultsSandboxLive code All modules

Supported languages (mappings in "MediaWiki:Lang/code" for {{int:lang}}, and their current native names)

  • (nup) Nupe
  • (als) Alemannisch
  • (bgc) हरियाणवी
  • (hke) kihunde
  • (ak) Akan
  • (acf) Kwéyòl Sent Lisi
  • (gsw) Alemannisch
  • (ase) American sign language
  • (sma) åarjelsaemien
  • (⧼lang/fvr⧽) poor’íŋ belé’ŋ
  • (smn) anarâškielâ
  • (ccp) 𑄌𑄋𑄴𑄟𑄳𑄦
  • (ace) Acèh
  • (tig) ትግሬ
  • (isv-cyrl) меджусловјанскы
  • (hak-hans) 客家语(简体)
  • (cdo-hant) 閩東語(傳統漢字)
  • (nr) isiNdebele seSewula
  • (nan-latn-pehoeji) Bân-lâm-gú (Pe̍h-ōe-jī)
  • (an) aragonés
  • (hak-latn) Hak-kâ-ngî (Pha̍k-fa-sṳ)
  • (knc) Yerwa Kanuri
  • (iba) Jaku Iban
  • (en-us) American English
  • (isv-latn) medžuslovjansky
  • (nan-latn-tailo) Bân-lâm-gú (Tâi-lô)
  • (cdo-latn) Mìng-dĕ̤ng-ngṳ̄ (Bàng-uâ-cê)
  • (agq) Aghem
  • (ang) Ænglisc
  • (hak-hant) 客家語(繁體)
  • (lua) ciluba
  • (af) Afrikaans
  • (aae) Arbërisht
  • (en-gb) British English
  • (cho) Chahta anumpa
  • (az) azərbaycanca
  • (abs) bahasa ambon
  • (gor) Bahasa Hulontalo
  • (roa-rup) armãneashti
  • (bkh) Bakoko
  • (kge) Kumoring
  • (ay) Aymar aru
  • (atj) Atikamekw
  • (ms) Bahasa Melayu
  • (bkc) Baka
  • (cs) čeština
  • (zh-min-nan) 閩南語 / Bân-lâm-gú
  • (bfd) Bafut
  • (mui) Baso Palembang
  • (bjn) Banjar
  • (ceb) Cebuano
  • (bcl) Bikol Central
  • (bs) bosanski
  • (ksf) Bafia
  • (bbc) Batak Toba
  • (sje) bidumsámegiella
  • (bbc-latn) Batak Toba
  • (ca) català
  • (ast) asturianu
  • (frp) arpetan
  • (gn) Avañe'ẽ
  • (brh) Bráhuí
  • (bi) Bislama
  • (cps) Capiceño
  • (bax) Bamum
  • (bar) Boarisch
  • (id) Bahasa Indonesia
  • (en-ca) Canadian English
  • (br) brezhoneg
  • (bug) Basa Ugi
  • (map-bms) Basa Banyumasan
  • (bew) Betawi
  • (bdr) Bajau Sama
  • (ban) Basa Bali
  • (rup) armãneashti
  • (bm) bamanankan
  • (bas) Basaa
  • (btm) Batak Mandailing
  • (ch) Chamoru
  • (fat) mfantse
  • (nys) Nyunga
  • (rmf) kaalengo tšimb
  • (guw) gungbe
  • (lad) Ladino
  • (kai) Karai-karai
  • (gom-latn) Gõychi Konknni
  • (gv) Gaelg
  • (lv) latviešu
  • (cnh) Hakha Chin
  • (gcf) kréyòl Gwadloup
  • (ilo) Ilokano
  • (bkm) Kom
  • (dsb) dolnoserbski
  • (gaa) Ga
  • (min) Minangkabau
  • (ny) Chi-Chewa
  • (ho) Hiri Motu
  • (isu) Isu
  • (eto) Eton
  • (kw) kernowek
  • (co) corsu
  • (rw) Ikinyarwanda
  • (ku-latn) kurdî (latînî)
  • (ik) Iñupiatun
  • (dga) Dagaare
  • (nv) Diné bizaad
  • (hu) magyar
  • (se) davvisámegiella
  • (ext) estremeñu
  • (se-fi) davvisámegiella (Suoma bealde)
  • (sei) Cmique Itom
  • (hrx) Hunsrik
  • (byv) Medumba
  • (ewo) Ewondo
  • (gl) galego
  • (kj) Kwanyama
  • (se-no) davvisámegiella (Norgga bealde)
  • (krj) Kinaray-a
  • (eu) euskara
  • (jbo) la .lojban.
  • (kri) Krio
  • (ha) Hausa
  • (pdc) Deitsch
  • (mcp) Maka
  • (ia) interlingua
  • (da) dansk
  • (lmo) lombard
  • (ibb) ibibio
  • (mua) Mundang
  • (mad) Madhurâ
  • (hil) Ilonggo
  • (li) Limburgs
  • (ki) Gĩkũyũ
  • (pcm) Naijá
  • (dtp) Kadazandusun
  • (etu) Ejagham
  • (arn) mapudungun
  • (ku) kurdî
  • (nmz) nawdm
  • (kea) kabuverdianu
  • (nap) Napulitano
  • (nah) Nāhuatl
  • (nla) Ngombala
  • (smj) julevsámegiella
  • (wls) Fakaʻuvea
  • (tum) chiTumbuka
  • (mh) Ebon
  • (niu) Niuē
  • (fit) meänkieli
  • (sms) nuõrttsääʹmǩiõll
  • (lij) Ligure
  • (lfn) Lingua Franca Nova
  • (mrh) Mara
  • (pih) Norfuk / Pitkern
  • (de-formal) Deutsch (Sie-Form)
  • (frr) Nordfriisk
  • (lg) Luganda
  • (kg) Kongo
  • (srq) mbia cheë
  • (mg) Malagasy
  • (mnc-latn) manju gisun
  • (ig) Igbo
  • (olo) livvinkarjala
  • (fy) Frysk
  • (ann) Obolo
  • (cak) Kaqchikel
  • (cy) Cymraeg
  • (gcr) kriyòl gwiyannen
  • (lem) Nomaande
  • (ff) Fulfulde
  • (it) italiano
  • (sw) Kiswahili
  • (fmp) Fe'fe'
  • (kbp) Kabɩyɛ
  • (lns) Lamnso'
  • (mi) Māori
  • (ht) Kreyòl ayisyen
  • (hif) Fiji Hindi
  • (jut) jysk
  • (et) eesti
  • (fj) Na Vosa Vakaviti
  • (vmw) emakhuwa
  • (zu) isiZulu
  • (nnz) Nda'nda'
  • (ee) eʋegbe
  • (de) Deutsch
  • (lzz) Lazuri
  • (liv) Līvõ kēļ
  • (nds-nl) Nedersaksies
  • (nia) Li Niha
  • (cbk-zam) Chavacano de Zamboanga
  • (uz-latn) oʻzbekcha
  • (ie) Interlingue
  • (dua) Duala
  • (bbj) Ghomála'
  • (uz) oʻzbekcha / ўзбекча
  • (mwl) Mirandés
  • (mos) moore
  • (es-419) español de América Latina
  • (vmf) Mainfränkisch
  • (nl-informal) Nederlands (informeel)
  • (chn) chinuk wawa
  • (lld) Ladin
  • (xh) isiXhosa
  • (hif-latn) Fiji Hindi
  • (yas) Nugunu
  • (haw) Hawaiʻi
  • (gd) Gàidhlig
  • (bqz) Mka'a
  • (la) Latina
  • (efi) Efịk
  • (na) Dorerin Naoero
  • (nge) Ngémba
  • (es) español
  • (yrl) Nhẽẽgatú
  • (is) íslenska
  • (egl) emiliàn e rumagnòl
  • (lus) Mizo ţawng
  • (igl) Igala
  • (mus) Mvskoke
  • (csb) kaszëbsczi
  • (kus) Kʋsaal
  • (kl) kalaallisut
  • (nl) Nederlands
  • (se-se) davvisámegiella (Ruoŧa bealde)
  • (gpe) Ghanaian Pidgin
  • (mt) Malti
  • (ltg) latgaļu
  • (dag) dagbanli
  • (nov) Novial
  • (ga) Gaeilge
  • (fr) français
  • (hr) hrvatski
  • (kr) kanuri
  • (gag) Gagauz
  • (lt) lietuvių
  • (frc) français cadien
  • (nrm) Nouormand
  • (kiu) Kırmancki
  • (sm) Gagana Samoa
  • (jv) Jawa
  • (en) English
  • (nb) norsk bokmål
  • (lb) Lëtzebuergesch
  • (ln) lingála
  • (hu-formal) magyar (formal)
  • (cr) Nēhiyawēwin / ᓀᐦᐃᔭᐍᐏᐣ
  • (gur) farefare
  • (nmg) Kwasio
  • (nnh) Ngiemboon
  • (nn) norsk nynorsk
  • (sn) chiShona
  • (rn) ikirundi
  • (aln) Gegë
  • (ike-latn) inuktitut
  • (hsb) hornjoserbsce
  • (gya) Gbaya
  • (eo) Esperanto
  • (fo) føroyskt
  • (fon) fɔ̀ngbè
  • (io) Ido
  • (ses) Koyraboro Senni
  • (ker) Kera
  • (eml) emiliàn e rumagnòl
  • (nb) norsk
  • (fur) furlan
  • (krl) karjal
  • (fkv) kvääni
  • (es-formal) español (formal)
  • (to) lea faka-Tonga
  • (avk) Kotava
  • (pam) Kapampangan
  • (bto) Iriga Bicolano
  • (oc) occitan
  • (kk-kz) қазақша (Қазақстан)
  • (kk-cn) قازاقشا (جۇنگو)
  • (nso) Sesotho sa Leboa
  • (ro) română
  • (pnt) Ποντιακά
  • (bo) བོད་ཡིག
  • (so) Soomaaliga
  • (rmc) romaňi čhib
  • (mo) молдовеняскэ
  • (tpi) Tok Pisin
  • (ts) Xitsonga
  • (vep) vepsän kel’
  • (lo) ລາວ
  • (ko) 한국어
  • (be-tarask) беларуская (тарашкевіца)
  • (luz) لئری دوٙمینی
  • (wes) Pidgin (Cameroon)
  • (alt) алтай тил
  • (bn) বাংলা
  • (anp) अंगिका
  • (lrc) لۊری شومالی
  • (yi) ייִדיש
  • (ary) الدارجة
  • (shy-latn) tacawit
  • (inh) гӀалгӀай
  • (arz) مصرى
  • (crh-latn) qırımtatarca (Latin)
  • (tn) Setswana
  • (mn) монгол
  • (sq) shqip
  • (nds) Plattdüütsch
  • (kn) ಕನ್ನಡ
  • (ar) العربية
  • (crh) qırımtatarca
  • (tru) Ṫuroyo
  • (nqo) ߒߞߏ
  • (kk-tr) qazaqşa (Türkïya)
  • (am) አማርኛ
  • (mhr) олык марий
  • (diq) Zazaki
  • (gom-deva) गोंयची कोंकणी
  • (qug) Runa shimi
  • (sr) српски / srpski
  • (rm) rumantsch
  • (kk-latn) qazaqşa (latın)
  • (om) Oromoo
  • (nod) ᨣᩤᩴᨾᩮᩬᩥᨦ
  • (km) ភាសាខ្មែរ
  • (arc) ܐܪܡܝܐ
  • (or) ଓଡ଼ିଆ
  • (mni) ꯃꯤꯇꯩ ꯂꯣꯟ
  • (mr) मराठी
  • (hsn) 湘語
  • (bat-smg) žemaitėška
  • (crh-ro) tatarşa
  • (mnc) manju gisun
  • (yo) Yorùbá
  • (tvu) Tunen
  • (apc) شامي
  • (vo) Volapük
  • (zh-tw) 中文(臺灣)
  • (zh-sg) 中文(新加坡)
  • (new) नेपाल भाषा
  • (sl) slovenščina
  • (tl) Tagalog
  • (zh-my) 中文(马来西亚)
  • (chr) ᏣᎳᎩ
  • (zh-mo) 中文(澳門)
  • (pl) polski
  • (ml) മലയാളം
  • (ur) اردو
  • (pnb) پنجابی
  • (vot) Vaďďa
  • (sty) себертатар
  • (ss) SiSwati
  • (ps) پښتو
  • (ru) русский
  • (el) Ελληνικά
  • (ku-arab) کوردی (عەرەبی)
  • (zh-hans) 中文(简体)
  • (cpx-hant) 莆仙語(繁體)
  • (zgh) ⵜⴰⵎⴰⵣⵉⵖⵜ ⵜⴰⵏⴰⵡⴰⵢⵜ
  • (os) ирон
  • (zea) Zeêuws
  • (yue-hans) 粵语(简体)
  • (shn) ၽႃႇသႃႇတႆး
  • (ks) कॉशुर / کٲشُر
  • (bgn) روچ کپتین بلوچی
  • (sr-el) srpski (latinica)
  • (ybb) Yemba
  • (sh-cyrl) српскохрватски (ћирилица)
  • (sd) سنڌي
  • (tt-latn) tatarça
  • (xsy) saisiyat
  • (xmf) მარგალური
  • (skr-arab) سرائیکی
  • (yue-hant) 粵語(繁體)
  • (wuu-hant) 吳語(正體)
  • (wuu) 吴语
  • (wo) Wolof
  • (simple) Simple English
  • (nan-hani) 閩南語
  • (war) Winaray
  • (tzm) ⵜⴰⵎⴰⵣⵉⵖⵜ
  • (zh-cn) 中文(中国大陆)
  • (tg-cyrl) тоҷикӣ
  • (te) తెలుగు
  • (ryu) 沖縄口
  • (vi) Tiếng Việt
  • (ota) لسان عثمانى
  • (vec) vèneto
  • (bho) भोजपुरी
  • (ve) Tshivenda
  • (wuu-hans) 吴语(简体)
  • (uz-cyrl) ўзбекча
  • (uk) українська
  • (ne) नेपाली
  • (ug-latn) Uyghurche
  • (ug-arab) ئۇيغۇرچە
  • (udm) удмурт
  • (tyv) тыва дыл
  • (dz) ཇོང་ཁ
  • (ty) reo tahiti
  • (tw) Twi
  • (be) беларуская
  • (hz) Otsiherero
  • (ce) нохчийн
  • (nyo) Orunyoro
  • (ttj) Orutooro
  • (tt-cyrl) татарча
  • (cpx-latn) Pó-sing-gṳ̂ (Báⁿ-uā-ci̍)
  • (trv) Seediq
  • (tr) Türkçe
  • (tok) toki pona
  • (mnw) ဘာသာမန်
  • (ckb) کوردی
  • (rut) мыхаӀбишды
  • (pt-br) português do Brasil
  • (vut) Vute
  • (th) ไทย
  • (ms-arab) بهاس ملايو
  • (tcy) ತುಳು
  • (mrj) кырык мары
  • (my) မြန်မာဘာသာ
  • (yue) 粵語
  • (ky) кыргызча
  • (dty) डोटेली
  • (loz) Silozi
  • (guc) wayuunaiki
  • (sv) svenska
  • (shi) Taclḥit
  • (su) Sunda
  • (de-ch) Schweizer Hochdeutsch
  • (za) Vahcuengh
  • (sro) sardu campidanesu
  • (ug) ئۇيغۇرچە / Uyghurche
  • (hy) հայերեն
  • (kk) қазақша
  • (sg) Sängö
  • (tg) тоҷикӣ
  • (ojb) Ojibwemowin
  • (tet) tetun
  • (ng) Oshiwambo
  • (bg) български
  • (ksh) Ripoarisch
  • (srn) Sranantongo
  • (szy) Sakizaya
  • (sr-ec) српски (ћирилица)
  • (prg) prūsiskan
  • (arq) جازايرية
  • (bpy) বিষ্ণুপ্রিয়া মণিপুরী
  • (as) অসমীয়া
  • (ady-cyrl) адыгабзэ
  • (ko-kp) 조선말
  • (sdh) کوردی خوارگ
  • (roa-tara) tarandíne
  • (sh-latn) srpskohrvatski (latinica)
  • (vls) West-Vlams
  • (tly) tolışi
  • (sh) srpskohrvatski / српскохрватски
  • (pwn) pinayuanan
  • (hno) ہندکو
  • (kum) къумукъ
  • (shi-tfng) ⵜⴰⵛⵍⵃⵉⵜ
  • (skr) سرائیکی
  • (bh) भोजपुरी
  • (pfl) Pälzisch
  • (got) 𐌲𐌿𐍄𐌹𐍃𐌺
  • (tg-latn) tojikī
  • (hyw) Արեւմտահայերէն
  • (crh-cyrl) къырымтатарджа (Кирилл)
  • (fi) suomi
  • (mnc-mong) ᠮᠠᠨᠵᡠ ᡤᡳᠰᡠᠨ
  • (ks-deva) कॉशुर
  • (gom) गोंयची कोंकणी / Gõychi Konknni
  • (shy) tacawit
  • (hi) हिन्दी
  • (aa) Qafár af
  • (ii) ꆇꉙ
  • (si) සිංහල
  • (be-x-old) беларуская (тарашкевіца)
  • (rue) русиньскый
  • (ka) ქართული
  • (ti) ትግርኛ
  • (zh) 中文
  • (gan-hant) 贛語(繁體)
  • (zh-classical) 文言
  • (koi) перем коми
  • (lzh) 文言
  • (pa) ਪੰਜਾਬੀ
  • (sgs) žemaitėška
  • (myv) эрзянь
  • (gan-hans) 赣语(简体)
  • (syl) ꠍꠤꠟꠐꠤ
  • (sdc) Sassaresu
  • (mk) македонски
  • (nyn) runyankore
  • (tk) Türkmençe
  • (ksw) စှီၤ
  • (ban-bali) ᬩᬲᬩᬮᬶ
  • (sk) slovenčina
  • (kk-cyrl) қазақша (кирил)
  • (kcg) Tyap
  • (fiu-vro) võro
  • (zh-hk) 中文(香港)
  • (ruq-latn) Vlăheşte
  • (ruq-cyrl) Влахесте
  • (szl) ślůnski
  • (sah) саха тыла
  • (rgn) Rumagnôl
  • (kab) Taqbaylit
  • (zh-hant) 中文(繁體)
  • (rsk) руски
  • (rmy) romani čhib
  • (ami) Pangcah
  • (kjp) ဖၠုံလိက်
  • (kbd) адыгэбзэ
  • (rif) Tarifit
  • (lez) лезги
  • (lbe) лакку
  • (awa) अवधी
  • (quc) Qatzijob\ʼal
  • (zgh-latn) tamaziɣt tanawayt
  • (cv) чӑвашла
  • (dv) ދިވެހިބަސް
  • (ks-arab) کٲشُر
  • (kaa) Qaraqalpaqsha
  • (nog) ногайша
  • (sat) ᱥᱟᱱᱛᱟᱲᱤ
  • (pms) Piemontèis
  • (jam) Patois
  • (kv) коми
  • (shi-latn) Taclḥit
  • (gan) 贛語
  • (gld) на̄ни
  • (nan) 閩南語 / Bân-lâm-gú
  • (din) Thuɔŋjäŋ
  • (sco) Scots
  • (grc) Ἀρχαία ἑλληνικὴ
  • (khw) کھوار
  • (pi) पालि
  • (pdt) Plautdietsch
  • (bqi) بختیاری
  • (ike-cans) ᐃᓄᒃᑎᑐᑦ
  • (mdf) мокшень
  • (av) авар
  • (pap-aw) Papiamento
  • (aeb-arab) تونسي
  • (pap) Papiamentu
  • (kjh) хакас
  • (kk-arab) قازاقشا (تٴوتە)
  • (cdo) 閩東語 / Mìng-dĕ̤ng-ngṳ̄
  • (iu) ᐃᓄᒃᑎᑐᑦ / inuktitut
  • (chy) Tsetsêhestâhese
  • (gu) ગુજરાતી
  • (acm) عراقي
  • (kbd-cyrl) адыгэбзэ
  • (bxr) буряад
  • (cu) словѣньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ
  • (azb) تۆرکجه
  • (qu) Runa Simi
  • (wya) Wyandot
  • (tdd) ᥖᥭᥰ ᥖᥬᥲ ᥑᥨᥒᥰ
  • (aeb-latn) Tûnsî
  • (he) עברית
  • (pcd) Picard
  • (aeb) تونسي / Tûnsî
  • (lki) لەکی
  • (nit) కొలామి
  • (de-at) Österreichisches Deutsch
  • (mzn) مازِرونی
  • (bcc) جهلسری بلوچی
  • (zh-yue) 粵語
  • (st) Sesotho
  • (tt) татарча / tatarça
  • (rki) ရခိုင်
  • (stq) Seeltersk
  • (tay) Tayal
  • (mag) मगही
  • (pag) Pangasinan
  • (mcn) vùn màsànà
  • (sjd) кӣллт са̄мь кӣлл
  • (hak) 客家語 / Hak-kâ-ngî
  • (nan-hant) 閩南語(傳統漢字)
  • (tly-cyrl) толыши
  • (mai) मैथिली
  • (scn) sicilianu
  • (cpx-hans) 莆仙语(简体)
  • (osa-latn) Wažáže íe
  • (ta) தமிழ்
  • (cpx) 莆仙語 / Pó-sing-gṳ̂
  • (krc) къарачай-малкъар
  • (wa) walon
  • (ruq) Vlăheşte
  • (pt) português
  • (sa) संस्कृतम्
  • (ja) 日本語
  • (fa) فارسی
  • (ba) башҡортса
  • (bag) Tuki
  • (wal) wolaytta
  • (bci) wawle
  • (xal) хальмг
  • (yav) Yangben
  • (sli) Schläsch
  • (blk) ပအိုဝ်ႏဘာႏသာႏ
  • (glk) گیلکی
  • (ab) аԥсшәа
  • (rwr) मारवाड़ी
  • (ady) адыгабзэ
  • (yat) Yambeta
  • (sju) ubmejesámiengiälla
  • (sc) sardu
  • (cop) ϯⲙⲉⲧⲣⲉⲙⲛ̀ⲭⲏⲙⲓ
  • (vro) võro

The previous list was generated by:

{{#invoke:Languages|forEachLanguage|preprocess=yes|pattern=<nowiki />
* <span style="font-size:smaller;">([[MediaWiki:Lang/$lc|<span style="font-family:monospace,monospace;" title="{{((}}#language:$lc{{!}}en{{))}}">{{((}}int{{!}}lang/$lc{{))}}</span>]])</span> <bdi lang="$lc" class="autonym lang-$lc">{{((}}#language:$lc{{))}}</bdi>
}}

Note that as of 2020-10-18, there's a new bug in Scribunto, which causes the standard "table.sort()" function to no longer accept a standard comparison function. Now when "table.sort()" fails, the error is correctly catched (instead of producing a visible error), but the list may not be sorted correctly (temporarily) in some cases. The bug is tracked and corrected in Mediawiki but waiting to be deployed with the fix. Nothing will need to be changed (using "perror()" will then no longer have any effect, it is just needed for now and the bug was not a bug of this module which was properly tested and sudddently failed unexpectedly). Thanks.

Note:

  • The list is retrieved using Module:Languages/List and sorted in native language name (LTR languages before RTL languages, then each one sorted by native script and then a locale-neutral sort order within each script) using Module:Multilingual description/sort (which is the consistant sort order used for multilingual navigation navigation boxes, or for showing lists of translations in multilingual descriptions, in a user-friendly way). For seeing the complete list of languages, tested with their directionality, look at the tests results table on Module talk:Multilingual description/sort/testcases.

Code

--[=[
Not globally exposed. Internal function only.

language_subpages( frame, transform, options )
Parameters
    frame:     The frame that was passed to the method invoked. The first argument or the page argument will be respected.
    transform: A transform function. Example: function( basepagename, subpagename, code, langname ) end
    options:   An object with options. Example: { abort= { on=function() end, time=0.8 }  }
        Following options are available:
        abort: Aborts iterating over the subpages if one of the conditions is met. If the process is aborted, nil is returned!
            on: Function to be called if an abort-condition was met.
            cycles: The maximum number of subpages to run over.
            time: Maximum time to spend running over the subpages.

]=]
local function language_subpages( frame, transform, options )
    local args, pargs, options = frame.args, ( frame:getParent() or {} ).args or {}, options or {};
    local title = args.page or args[1] or pargs.page or pargs[1] or "";
    local abort = options.abort or {};
    local at, clock = type( abort.on ), os.clock();
    local ac = function()
        if  at == 'function' or ( at == 'table' and getmetatable(abort.on).__call ) then
            abort.on();
        end
    end
    local tt = type( transform );
    local page = require( 'Module:Page' );

    title = page.clean(title);

    if tt == 'function' or ( tt == 'table' and getmetatable(transform).__call ) then
        local fetch, pages, langcode, langname = mw.language.fetchLanguageName, {};
--[==[

     / \
    / | \
   /  ·  \
   ¯¯¯¯¯¯¯
   Page.subpages() no longer works because it attempted to parse the HTML content generated by
   calling the parser function "Special:Prefixindex:" which is no longer expanded in Lua but
   converted to a "stripped tag" (containing a unique identifier surrounded by ASCII DEL characters)
   representing the tag name and its parameters.
   The actual expansion of stripped tags can no longer be performed in Lua.
   Now unstripping these tags just kills ALL these tags (except "wiki" tags) instead of performing
   their expansion by running the extension code. Only MediaWiki can unstrip these tags in texts after
   they have been returned by Lua.
   For this reason, page.subpages() is now completely empty (Module:Page no longer works).
   This cannot be bypassed, except by using a Scribunto extension library if lifting the limits set by mw.unstrip.
   Note that "Special:Prefixindex:" is also costly, even if it just requires a single database query to
   get all subpages, instead of one costly #ifexist or one costly mw.title() property reading per
   tested subpage to know if it exists.
   For now there's still no reliable way to get a list of subpages, or performing queries similar to
   the [[Special:Prefixindex]] page or list members of a category like when viewing a category page.
   Ideally, there should exist a method for such queries on Title objects returned by the mw.title library;
   but for now there's none.
   In Lua now, the only expansion possible with an immediate effect is the expansion of standard templates,
   all special tags or special pages, or parser function extensions do not work (Only the #expr parser
   function is supported by using an external Scribunto library).
--]==]
        for pg in page.subpages( title, { ignoreNS=true } ) do
            if abort.cycles then
                abort.cycles = abort.cycles - 1
                if 0 == abort.cycles then return ac()  end
            end
            if abort.time then
                if (os.clock() - clock) > abort.time then return ac()  end
            end
            if mw.ustring.len( pg ) <= 12 then
                langcode = string.lower( pg );
                langname = fetch( langcode );
                if langname ~= '' then
                    table.insert( pages, transform( title, pg, langcode, langname ) );
                end
            end
        end
        return pages;
    end
    return {};
end

local function cloneArgs(frame)
    local args, pargs = {}, {}
    for k,v in pairs( frame.args ) do args[k] = v end
    if frame:getParent() then
        for k,v in pairs( frame:getParent().args ) do pargs[k] = v end
    end
    return args, pargs
end



local p = {};

--[=[
Usage:
{{#invoke:languages|internal|Template:Adjective}}
]=]
function p.internal(frame)
    return table.concat(
        language_subpages( frame,
            function( title, page, code, name )
                return mw.ustring.format(
                    '<bdi class="language lang-%s" lang="%s">[[%s/%s|%s]]</bdi>',
                    code, code,
                    title, page,
                    name
                );
            end
        ),
        '&nbsp;<b>·</b>&#32;'
    );
end

--[=[
Usage:
{{#invoke:languages|external|Template:Adjective}}
]=]
function p.external(frame)
    return table.concat(
        language_subpages( frame,
            function( title, page, code, name )
                return mw.ustring.format(
                    '<bdi class="language lang-%s" lang="%s">[%s/%s %s]</bdi>',
                    code, code,
                    tostring( mw.uri.fullUrl( title ) ), page:gsub( ' ', '_' ),
                    name
                );
            end
        ),
        '&nbsp;<b>·</b>&#32;'
    );
end

--[=[
forEachLanguage

This function iterates over all language codes known to MediaWiki based on a maintained list
replacing patterns in a pattern-string for each language

Usage
{{#invoke:Languages|forEachLanguage
  |pattern=patternstring
  |before=string to insert before iteration
  |after=string added after iteration
  |sep=separator string between iterations
  |inLang=langcode used for $lnTrP and $lnTrUC1
}}

Parameters
    pattern: A pattern string which is processed for each language and which is concatenated at the end and returned as one string
    before: A string that is inserted before the concatenated result
    after: A string that is inserted after the concatenated result
    sep: A string that is inserted between each line created from the pattern while iterating (like ProcessedPattern_sep_ProcessedPattern_sep_ProcessedPattern)
    inLang: Langcode to use for $lnTrP and $lnTrUC1
    preprocess: if set to a non-empty value, the output will be preprocessed before being returned.

Warning
    The output is still not prepreprocessed by default: so parser functions and magic keywords generated by the pattern are still not executed and replaced,
    and template transclusions are still not expanded (see examples in other functions in this module).
    When using this function directly from a MediaWiki page or template, this means it is only possible to use patterns generating basic MediaWiki formatting
    or HTML tags. It you want the output to be preprocessed (in the given frame), set the preprocess parameter to a non-empty string.
    
Patterns
    $lc - language code such as en or de
    $lnP - language name in own language (autonym)
    $lnUC1 - language name in own language (autonym), first letter upper case
    $lnTrP - language name translated to the language requested by language code passed to inLang
    $lnTrUC1 - language name translated to the language requested by language code passed to inLang, first letter upper case

Example
    {{#invoke:Languages|forEachLanguage|pattern=<span lang="$lc" xml:lang="$lc" class="language lang-$lc">[[Page/$lc|$lnP]]</span>}}
]=]

-- =p.forEachLanguage({ args= { pattern = "$lc - $lnTrP\n", inLang = "en" } })
function p.forEachLanguage(frame)
    local l = require("Module:Languages/List")

    local ret = {}
    local lang    = mw.language
    local line
    local pattern = frame.args.pattern   or frame.args[1] or ""
    local prefix  = frame.args.before    or frame.args[2] or ""
    local postfix = frame.args.after     or frame.args[3] or ""
    local sep     = frame.args.sep       or frame.args.separator or frame.args[4] or ""
    local inLang  = frame.args.inLang    or frame.args[5] or nil
    local preprocess = frame.args.preprocess or frame.args[6] or ""

    local langNameUCFirstReq           = not not pattern:find( "$lnUC1", 1, true )
    local langNameReq                  = not not pattern:find( "$lnP", 1, true ) or langNameUCFirstReq
    local langNameTranslatedUCFirstReq = not not pattern:find( "$lnTrUC1", 1, true )
    local langNameTranslatedReq        = not not pattern:find( "$lnTrP", 1, true ) or langNameTranslatedUCFirstReq
    local contentLangInstance = mw.language.getContentLanguage()
    local inLangLangInstance
    local l = mw.language.fetchLanguageNames() -- autonyms
    local lTr
    local lcIdList = require('Module:Languages/List').getSortedList( l )

    if langNameTranslatedReq then
        inLangLangInstance = --[==[
            mw.getLanguage( inLang ) -- Quota hit in :ucfirst() if using too many langInstances
            --]==] contentLangInstance
        lTr = mw.language.fetchLanguageNames( inLang ) -- translated names
    end

    for _, lcId in pairs( lcIdList ) do
        local subst = lcId:gsub('%%', '%%%%')
        line = pattern:gsub( "%$lc", subst )
        local langName, langInstance
        -- autonym (name of lcId in locale lcId)
        if langNameReq then
            langName = l[lcId]
            subst = langName:gsub('%%', '%%%%')
            line = line:gsub( "%$lnP", subst )
        end
        if langNameUCFirstReq then
            langInstance = --[==[
                mw.getLanguage( lcId ) -- Quota hit in :ucfirst() if using too many langInstances
                --]==] contentLangInstance
            langName = langInstance:ucfirst( langName )
            subst = langName:gsub('%%', '%%%%')
            line = line:gsub( "%$lnUC1", subst )
        end

        -- translated name (name of lcId in locale inLang)
        if langNameTranslatedReq then
            langName = lTr[lcId]
            subst = langName:gsub('%%', '%%%%')
            line = line:gsub( "%$lnTrP", subst )
        end
        if langNameTranslatedUCFirstReq then
            langName = inLangLangInstance:ucfirst( langName )
            subst = langName:gsub('%%', '%%%%')
            line = line:gsub( "%$lnTrUC1", subst )
        end

        table.insert(ret, line)
    end
    ret = prefix .. table.concat( ret, sep ) .. postfix
    if preprocess ~= '' then
        ret = frame:preprocess(ret)
    end
    return ret
end

--[=[
 Provide logic for [[Template:Lle]] (Language Links external, to be substituted, language names written exactly as #language would provide them)
 Warning: may expands too many costly #ifexist without limitation (if not substituted into a separate "/lang" template)
]=]
function p.lle(frame)
    return frame:preprocess(
        p.forEachLanguage({
            args = {
                pattern = '{{subst:#ifexist:{{{1}}}/$lc|[{{subst:fullurl:{{{1}}}/$lc}} <bdi class="language lang-$lc" lang="$lc">$lnP</bdi>]&nbsp;<b>∙</b>&#32;<!--\n-->}}'
            }
        })
    )
end

--[=[
 Provide logic for [[Template:Ll]] (Language Links internal, to be substituted, language names written exactly as #language would provide them)
 Warning: may expands too many costly #ifexist without limitation (if not substituted into a separate "/lang" template)
]=]
function p.ll(frame)
    return frame:preprocess(
        p.forEachLanguage({
            args = {
                pattern = '{{subst:#ifexist:{{{1}}}/$lc|[[{{{1}}}/$lc|<bdi class="language lang-$lc" lang="$lc">$lnP</bdi>]]&nbsp;<b>∙</b>&#32;<!--\n-->}}'
            }
        })
    )
end


--------------------------------------------------------
--- Different approaches for [[Template:Lang links]] ---
--------------------------------------------------------

--[=[
 Provide logic for [[Template:Lang links]]
 Using a cute Hybrid-Method:
    First check the subpages which is quite fast; if there are too many fall back to checking for each language page individually
]=]

-- =p.langLinksNonExpensive({ args= { page='Commons:Picture of the Year/2010' }, getParent=function() end })
-- =p.langLinksNonExpensive({ args= { page='Main Page' }, getParent=function() end })
-- =p.langLinksNonExpensive({ args= { page='Template:No_source_since' }, getParent=function() end })
-- =p.langLinksNonExpensive({ args= { page='MediaWiki:Gadget-HotCat' }, getParent=function() end })
function p.langLinksNonExpensive(frame)
    local args, pargs = frame.args, ( frame:getParent() or {} ).args or {};
    local title = args.page or args[1] or pargs.page or pargs[1] or "";
    local contentLangInstance = mw.language.getContentLanguage();
    local pages2
    if frame.preprocess == nil then
        frame = mw.getCurrentFrame()
    end
--[==[
    local options = {
        abort = {
            time = 3.5,
            on = function()
                pages2 = p.forEachLanguage({
                    args = {
                       pattern = '{{#ifexist:' .. title .. '/$lc|[[' .. title .. '/$lc|<bdi lang="$lc">$lnP</bdi>]]&nbsp;<b>∙</b>&#32;}}'
                    }
                })
            end
        }
    }
    local pages = language_subpages( frame,
        function( title, page, code, langname )
            return mw.ustring.format(
                '[[%s/%s|<bdi lang="%s">%s</bdi>]]</span>&nbsp;<b>∙</b>&#32;',
                title, page, code, langname
            )
        end, options );
    return pages2 and frame:preprocess(pages2) or table.concat(pages, '');
--]==]
    return frame:preprocess(
        p.forEachLanguage( {
            args = {
                pattern = '{{#ifexist:' .. title .. '/$lc|[[' .. title .. '/$lc|<bdi lang="$lc">$lnP</bdi>]]&nbsp;<b>∙</b>&#32;}}'
            }
        })
    )
end

---------------------------------------------------------
----------------- [[Template:Autolang]] -----------------
---------------------------------------------------------
--[[
  Works like {{autotranslate}} just allowing an unlimited number of arguments, even named arguments.
  It's doing Magic! No arguments should be passed to {{#invoke:}}
]]

function p.autolang(frame)
    local args, pargs = cloneArgs( frame )
    if nil == args.useargs then
        if not args.base then args = pargs end
    elseif 'both' == args.useargs then
        for k,v in pairs(args) do pargs[k] = v end
        args = pargs
    elseif 'parent' == args.useargs then
        args = pargs
        if pargs.base and not args.base then
            args.base = pargs.base
        end
    end
    local base = args.base
    local userlang = frame:callParserFunction('int', 'lang')
    local tl, tlns = 'Template:', 10
    local tlb, fallback1, currenttemplate, currenttemplatepage
    local fallback, contentlang = mw.text.split( userlang, '-', true )[1], mw.language.getContentLanguage():getCode()

    local function createReturn(title)
        local ret
        local tlargs = {}
         -- When LUA is invoked, templates are already expanded. This must be respected.
        return frame:expandTemplate{ title = title, args = args }
    end

    if not base then
        return ("'autolang' in [[Module:Languages]] was called but the 'base' parameter could not be found." ..
            "The base parameter specifies the template that's subpages will be sought for a suitable translation.")
    end
    tlb = tl .. base .. '/'

    currenttemplate = tlb .. userlang
    currenttemplatepage = mw.title.new( currenttemplate, tlns )
    if currenttemplatepage and currenttemplatepage.exists then
        return createReturn(currenttemplate)
    end

    fallback1 = frame:preprocess( '{{Fallback|1=' .. base .. '|2=' .. userlang .. '}}' )
    if fallback1 ~= contentlang then
        return createReturn(tlb .. fallback1)
    end

    currenttemplate = tlb .. fallback
    currenttemplatepage = mw.title.new( currenttemplate, tlns )
    if currenttemplatepage and currenttemplatepage.exists then
        return createReturn(currenttemplate)
    end

    currenttemplate = tlb .. contentlang
    currenttemplatepage = mw.title.new( currenttemplate, tlns )
    if currenttemplatepage and currenttemplatepage.exists then
        return createReturn(currenttemplate)
    end
    return createReturn(tl .. base)
end

--[=[
Usage:
{{#invoke:languages|isKnownLanguageTag|gsw}} -> 1
{{#invoke:languages|isKnownLanguageTag|doesNotExist}} ->
]=]
function p.isKnownLanguageTag(frame)
    return mw.language.isKnownLanguageTag( frame.args[1] or frame.args.tag or frame.args.code or '' ) and '1' or ''
end

function p.file_languages(frame)
    local M_link = require( 'Module:Link' )
    local contentLangInstance = mw.language.getContentLanguage()
    local pattern = frame.args.pattern or '%s (%s)'
    local original = frame.args.original or mw.title.getCurrentTitle().text
    local ext_start, _ = string.find( original, '\.%w+$' )
    local file_ext = string.sub( original, ext_start )
    original = string.sub( original, 0, ext_start - 1 )
    return frame:preprocess(
        '<gallery>\n' ..
        (table.concat(
            M_link.forEachLink(
                p.forEachLanguage({
                    args = { pattern = '[[$lc]]' }
                }),
                function( linkInfo )
                    local filename = mw.ustring.format( pattern, original, linkInfo.text ) .. file_ext
                    local filepage = mw.title.new( filename, 6 )
                    if filepage and filepage.exists then
                        return mw.ustring.format( '%s|%s',
                            filename,
                            mw.language.fetchLanguageName( linkInfo.text )
                        )
                    else
                        return nil
                    end
                end
            ), '\n'
        )) ..
        '\n</gallery>'
    )
end

function p.runTests()
    return p.langLinksNonExpensive({
        args = {
            page = 'Module:Languages/testcases/test'
        },
        getParent = function() end
    }) ==
        '[[Module:Languages/testcases/test/de|<bdi lang="de">Deutsch</bdi>]]&nbsp;<b>∙</b>&#32;' ..
        '[[Module:Languages/testcases/test/en|<bdi lang="en">English</bdi>]]&nbsp;<b>∙</b>&#32;'
end

return p;