跳转到内容

模块:Lang/data

出自维基百科,自由个百科全书

箇module源自en:Special:PermanentLink/1140860335zh:Special:PermanentLink/75994477


local lang_obj = mw.language.getContentLanguage();
local this_wiki_lang_tag = lang_obj.code;										-- get this wiki's language tag


--[[--------------------------< L A N G _ N A M E _ T A B L E >------------------------------------------------

primary table of tables that decode:
	lang -> language tags and names
	script -> ISO 15924 script tags
	region -> ISO 3166 region tags
	variant -> iana registered variant tags
	suppressed -> map of scripts tags and their associated language tags

all of these data come from separate modules that are derived from the IANA language-subtag-registry file

key_to_lower() avoids the metatable trap and sets all keys in the subtables to lowercase. Many language codes
have multiple associated names; Module:lang is only concerned with the first name so key_to_lower() only fetches
the first name.

]]

local function key_to_lower (module, src_type)
	local out = {};
	local source = (('var_sup' == src_type) and require (module)) or mw.loadData (module);		-- fetch data from this module; require() avoids metatable trap for variant data
	if 'var_sup' == src_type then
		for k, v in pairs (source) do
			out[k:lower()] = v;													-- for variant and suppressed everything is needed
		end

	elseif 'lang' == src_type and source.active then							-- for ~/iana_languages (active)
		for k, v in pairs (source.active) do
			out[k:lower()] = v[1];												-- ignore multiple names; take first name only
		end

	elseif 'lang_dep' == src_type and source.deprecated then					-- for ~/iana_languages (deprecated)
		for k, v in pairs (source.deprecated) do
			out[k:lower()] = v[1];												-- ignore multiple names; take first name only
		end

	else																		-- here for all other sources
		for k, v in pairs (source) do
			out[k:lower()] = v[1];												-- ignore multiple names; take first name only
		end
	end
	return out;
end

local lang_name_table_t = {
	lang = key_to_lower ('Module:Language/data/iana languages', 'lang'),
	lang_dep = key_to_lower ('Module:Language/data/iana languages', 'lang_dep'),
	script = key_to_lower ('Module:Language/data/iana scripts'),				-- script keys are capitalized; set to lower
	region = key_to_lower ('Module:Language/data/iana regions'),				-- region keys are uppercase; set to lower
	variant = key_to_lower ('Module:Language/data/iana variants', 'var_sup'),
	suppressed = key_to_lower ('Module:Language/data/iana suppressed scripts', 'var_sup'),	-- script keys are capitalized; set to lower
	}


--[[--------------------------< I 1 8 N   M E D I A W I K I   O V E R R I D E >--------------------------------

For internationalization; not used at en.wiki

The language names taken from the IANA language-subtag-registry file are given in English. That may not be ideal.
Translating ~8,000 language names is also not ideal.  MediaWiki maintains (much) shorter lists of language names
in most languages for which there is a Wikipedia edition.  When desired, Module:Lang can use the MediaWiki
language list for the local language.

Caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all.
When incomplete, MediaWiki's list will 'fall back' to another language (typically English).  When that happens
add an appropriate entry to the override table below.

Caveat lector: the list of MediaWiki language names for your language may not be correct.  At en.wiki, the
MediaWiki language names do not agree with the IANA language names for these ISO 639-1 tags.  Often it is simply
spelling differences:
	bh: IANA: Bihari languages MW: Bhojpuri – the ISO 639-3 tag for Bhojpuri is bho
	bn: IANA: Bengali MW: Bangla – Bengali is the exonym, Bangla is the endonym
	dv: IANA: Dhivehi MW: Divehi
	el: IANA: Modern Greek MW: Greek
	ht: IANA: Haitian MW: Haitian Creole
	ky: IANA: Kirghiz MW: Kyrgyz
	li: IANA: Limburgan MW: Limburgish
	or: IANA: Oriya MW: Odia
	os: IANA: Ossetian MW: Ossetic
	"pa: IANA: Panjabi MW: Punjabi
	"ps: IANA: Pushto MW: Pashto
	"to: IANA: Tonga MW: Tongan
	"ug: IANA: Uighur MW: Uyghur
use the override table to override language names that are incorrect for your project

To see the list of names that MediaWiki has for your language, enter this in the Debug colsole:
	=mw.dumpObject (mw.language.fetchLanguageNames ('<tag>', 'all'))
(replacing <tag> with the language tag for your language)

Use of the MediaWiki language names lists is enabled when media_wiki_override_enable is set to boolean true.

]]

local media_wiki_override_enable = false;										-- set to true to override IANA names with MediaWiki names; always false at en.wiki
																				-- caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all
	if true == media_wiki_override_enable then
		local mw_languages_by_tag_t = mw.language.fetchLanguageNames (this_wiki_lang_tag, 'all');	-- get a table of language tag/name pairs known to MediaWiki
		for tag, name in pairs (mw_languages_by_tag_t) do						-- loop through each tag/name pair in the MediaWiki list
			if lang_name_table_t.lang[tag] then									-- if the tag is in the main list
				lang_name_table_t.lang[tag] = name;								-- overwrite exisiting name with the name from MediaWiki
			end
		end
	end


--[[--------------------------< O V E R R I D E >--------------------------------------------------------------

Language codes and names in this table override the BCP47 names in lang_name_table.

indexes in this table shall always be lower case

]]

local override = {
------------------------------< I S O _ 6 3 9 - 1 >------------------------------------------------------------

	["aa"] = {"阿法尔语"},														-- Afar
	["ab"] = {"阿布哈兹语"},													-- Abkhazian
	["ae"] = {"阿维斯陀语"},													-- Avestan
	["af"] = {"南非语"},														-- Afrikaans
	["ak"] = {"阿坎语"},														-- Akan
	["am"] = {"阿姆哈拉语"},													-- Amharic
	["an"] = {"亚拉冈语"},														-- Aragonese
    ["ar"] = {"阿拉伯语"},
    ["as"] = {"阿萨姆语"},
	["av"] = {"阿瓦尔语"},														-- Avaric
    ["ay"] = {"艾马拉语"},														-- Aymara
    ["az"] = {"阿塞拜疆语"},													-- Azerbaijani
    ["ba"] = {"巴什基尔语"},													-- Bashkir
    ["be"] = {"白俄罗斯语"},													--
    ["bg"] = {"保加利亚语"},													--
	["bh"] = {"比哈尔语"},														-- Bihari languages; collective
    ["bi"] = {"比斯拉马语"},
    ["bm"] = {"班巴拉语"},														-- Bambara, Bamanankan
    ["bn"] = {"孟加拉语"},
	["bo"] = {"标准藏语"},														-- Tibetan
	["br"] = {"布列塔尼语"},													-- Brezhoneg
    ["bs"] = {"波斯尼亚语"},
    ["bua"] = {"布里亚特语"},													--Syriac
    ["ca"] = {"加泰隆尼亚语"},
    ["ce"] = {"车臣语"},
    ["ceb"] = {"宿雾语"},
    ["ch"] = {"查莫罗语"},
    ["co"] = {"科西嘉语"},
    ["cr"] = {"克里语"},
    ["cs"] = {"捷克语"},
	["cu"] = {"教会斯拉夫语"},												-- Church Slavic, Church Slavonic, Old Bulgarian, Old Church Slavonic, Old Slavonic'
    ["cv"] = {"楚瓦什语"},
    ["cy"] = {"威尔斯语"},
    ["da"] = {"丹麦语"},
    ["de"] = {"德语"},
	["de-AT"] = {"奥地利德语"},
	["dv"] = {"迪维希语"},
	["dz"] = {"不丹语"},
	["ee"] = {"埃维语"},
	["el"] = {"希腊语"},														-- Modern Greek (1453-)
	["en"] = {"英语"},
	["en-AU"] = {"澳洲英语"},
	["en-CA"] = {"加拿大英语"},
	["en-GB"] = {"英国英语"},
	["en-IE"] = {"爱尔兰英语"},
	["en-NZ"] = {"新西兰英语"},
	["en-SA"] = {"南非英语"},
	["en-US"] = {"美国英语"},
	["eo"] = {"世界语"},
    ["es"] = {"西班牙语"},
    ["et"] = {"爱沙尼亚语"},
    ["eu"] = {"巴斯克语"},
    ["evn"] = {"鄂温克语"},														--Classical Syriac
    ["fa"] = {"波斯语"},
	["ff"] = {"富拉语"},														-- Fulah
	["fi"] = {"芬兰语"},
	["fj"] = {"斐济语"},
	["fo"] = {"法罗语"},
	["fr"] = {"法语"},
	["fy"] = {"菲士兰语"},														-- Western Frisian
    ["ga"] = {"爱尔兰语"},
    ["gd"] = {"苏格兰盖尔语"},
    ["gl"] = {"加利西亚语"},
    ["gn"] = {"瓜拉尼语"},
    ["gu"] = {"古吉拉特语"},
    ["gv"] = {"曼岛语"},
    ["ha"] = {"豪萨语"},
    ["he"] = {"希伯来语"},
    ["hi"] = {"印地语"},
    ["ho"] = {"希里木托语"},
    ["hr"] = {"克罗地亚语"},
	["ht"] = {"海地克里奥尔语"},												-- Haitian, Haitian Creole
    ["hu"] = {"匈牙利语"},
    ["hy"] = {"亚美尼亚语"},
	["hz"] = {"赫雷罗语"},													-- Herero
	["ia"] = {"因特语"},												    	-- Interlingua (International Auxiliary Language Association)
    ["id"] = {"印尼语"},
    ["ie"] = {"西方国际语"},
    ["ig"] = {"伊博语"},													    -- Igbo
	["ii"] = {"彝语北部方言"},													-- Sichuan Yi, Nuosu
	["ik"] = {"依努庇亚克语"},
	["io"] = {"伊多语"},
	["is"] = {"冰岛语"},
	["it"] = {"意大利语"},
	["iu"] = {"伊努克提图特语"},
	["ja"] = {"日本闲话"},
	["jv"] = {"爪哇语"},
	["ka"] = {"格鲁吉亚语"},
	["kg"] = {"刚果语"},
	["ki"] = {"基库尤语"},														-- Kikuyu, Gikuyu
	["kj"] = {"宽亚玛语"},														-- Kwanyama, Oshikwanyama
	["kk"] = {"哈萨克语"},														-- Kazakh; same, delete?
	["kl"] = {"格陵兰语"},														-- Kalaallisut, Greenlandic
	["km"] = {"高棉语"},														-- Central Khmer
	["kn"] = {"卡纳达语"},														-- Kannaḍa
	["ko"] = {"韩语"},															-- Korean
	["ks"] = {"喀什米尔语"},													-- Kashmiri
	["ku"] = {"库德语"},														-- Kurdish
	["kv"] = {"科米语"},														-- Komi
	["kw"] = {"康瓦尔语"},														-- Cornish, Kernowek
	["ky"] = {"吉尔吉斯语"},													-- Kirghiz, Kyrgyz
    ["la"] = {"拉丁语"},
    ["lb"] = {"卢森堡语"},
	["lg"] = {"卢干达语"},														-- Ganda
	["li"] = {"林堡语"},														-- Limburgan, Limburger, Limburgish
	["ln"] = {"林格拉语"},
	["lo"] = {"寮语"},
	["lt"] = {"立陶宛语"},
	["lu"] = {"卢巴卡丹加语"},
	["lv"] = {"拉脱维亚语"},
	["mg"] = {"马达加斯加语"},
	["mh"] = {"马绍尔语"},
	["mi"] = {"毛利语"},														-- Maori
    ["mk"] = {"马其顿语"},
    ["ml"] = {"马拉雅拉姆语"},
    ["mn"] = {"蒙古语"},
    ["mo"] = {"摩尔多瓦语"},
    ["mr"] = {"马拉提语"},														-- Marathi
	["ms"] = {"马来语"},														-- Malay (macrolanguage)
    ["mt"] = {"马尔他语"},
    ["my"] = {"缅甸语"},
	["na"] = {"瑙鲁语"},														-- Nauru
	["nb"] = {"书面挪威语"},													-- Norwegian Bokmål
	["nd"] = {"北恩德贝勒语"},													-- North Ndebele
	["ne"] = {"尼泊尔语"},														-- Nepali (macrolanguage)
	["ng"] = {"恩敦加语"},
    ["nl"] = {"荷兰语"},
	["nn"] = {"新挪威语"},														-- Norwegian Nynorsk
    ["no"] = {"挪威语"},
	["nr"] = {"南恩德贝勒语"},													-- South Ndebele <not found in Chinese Wikipedia>
	["nv"] = {"纳瓦荷语"},
	["ny"] = {"齐切瓦语"},														-- Nyanja, Chewa, Chichewa
	["oc"] = {"奥克语"},														-- Occitan (post 1500)
	["oj"] = {"奥杰布瓦语"},													-- Ojibwa
	["om"] = {"奥罗莫语"},
	["or"] = {"奥里亚语"},														-- Oriya (macrolanguage), Odia (macrolanguage)
    ["os"] = {"奥塞梯语"},
	["pa"] = {"旁遮普语"},														-- Panjabi, Punjabi
	["pi"] = {"巴利语"},														-- Pali; same, delete?
	["pl"] = {"波兰语"},
    ["ps"] = {"普什图语"},
    ["pt"] = {"葡萄牙语"},
    ["qu"] = {"奇楚瓦语"},
    ["rm"] = {"罗曼什语"},														-- Romansh
	["rn"] = {"克伦地语"},														-- Rundi
	["ro"] = {"罗马尼亚语"},													-- Romanian, Moldavian, Moldovan; same as first in IANA list, delete?
	["ru"] = {"俄语"},
	["rw"] = {"卢旺达语"},														-- Kinyarwanda; same, delete?
    ["sa"] = {"梵语"},
    ["sc"] = {"萨丁尼亚语"},
    ["sd"] = {"信德语"},
    ["se"] = {"北萨米语"},
    ["sg"] = {"桑戈语"},
    ["sh"] = {"塞尔维亚-克罗地亚语"},
	["si"] = {"僧伽罗语"},														-- Sinhala, Sinhalese
    ["sk"] = {"斯洛伐克语"},
    ["sl"] = {"斯洛文尼亚语"},													-- Slovenian
    ["sm"] = {"萨摩亚语"},
    ["sn"] = {"绍纳语"},
    ["so"] = {"索马里语"},
    ["sq"] = {"阿尔巴尼亚语"},
    ["sr"] = {"塞尔维亚语"},
	["sr-Cyrl"] = {"塞尔维亚语西里尔字母"},										-- sr = Serbian; Cyrillic is the alphabet
	["ss"] = {"史瓦济语"},														-- Swati
	["st"] = {"塞索托语"},														-- Southern Sotho
	["su"] = {"巽他语"},
    ["sv"] = {"瑞典语"},
	["sw"] = {"斯瓦希里语"},													-- Swahili (macrolanguage)
    ["ta"] = {"坦米尔语"},
    ["te"] = {"泰卢固语"},
    ["tg"] = {"塔吉克语"},
    ["th"] = {"泰语"},
    ["ti"] = {"提格利尼亚语"},
    ["tk"] = {"土库曼语"},
    ["tl"] = {"他加禄语"},
    ["tn"] = {"札那语"},
    ["to"] = {"东加语"},
    ["tr"] = {"土耳其语"},
	["to"] = {"东加语"},														-- Tonga (Tonga Islands)
	["ts"] = {"聪加语"},														-- Tsonga, Xitsonga
	["tt"] = {"鞑靼语"},														-- Tatar
	["tw"] = {"契维语"},
	["ty"] = {"大溪地语"},
	["ug"] = {"维吾尔语"},
	["uk"] = {"乌克兰语"},
	["ur"] = {"乌尔都语"},
	["uz"] = {"乌兹别克语"},
	["ve"] = {"文达语"},
    ["vi"] = {"越南语"},
    ["vo"] = {"沃拉普克语"},
    ["wa"] = {"瓦隆语"},
    ["wo"] = {"沃洛夫语"},
    ["xh"] = {"科萨语"},
    ["yi"] = {"意第绪语"},
    ["yo"] = {"约鲁巴语"},
	["za"] = {"壮语"},															-- Zhuang, Chuang; ; same as first in IANA list, delete?
	["zh"] = {"中文"},
	["zu"] = {"祖鲁语"},

-- ISO 639-2 codes
	["ber"] = {"柏柏尔语"},														-- Berber languages
	["cel"] = {"原始凯尔特语"},													-- Celtic languages
    ["cop"] = {"科普特语"},														-- Coptic languages
    ["fil"] = {"菲律宾语"},
	["gem"] = {"原始日耳曼语"},													-- Germanic languages
	["jbo"] = {"逻辑语"},													    -- Lojban
	["kum"] = {"库梅克语"},
	["myn"] = {"玛雅语系"},														-- Mayan languages
	["nah"] = {"纳瓦特尔语"},													-- Nahuatl languages
	["pra"] = {"普拉克里特诸语言"},												-- Prakrit languages
--	["roa"] = {"泽西语"},														-- Romance languages
	["sal"] = {"萨利希语系"},													-- Salishan languages
	["sat"] = {"桑塔利语"},
	["sla"] = {"斯拉夫语族"},													-- Slavic languages
	["son"] = {"桑海语族"},														-- Songhai languages
	["sux"] = {"苏美语"},
    ["uk"] = {"乌克兰语"},
	["wen"] = {"索布语"},														-- Sorbian languages

-- ISO 639-3 codes
	["abk"] = {"阿布哈兹语"},														-- not in IANA; see code ab
	["ace"] = {"亚齐语"},														-- Achinese
	["ady"] = {"阿迪格语"},														-- Adyghe language
	["aec"] = {"萨伊迪阿拉伯语"},												-- Saidi Arabic
	["ain"] = {"阿伊努语"},															-- Ainu (Japan)
	["akk"] = {"阿卡德语"},
	["akl"] = {"阿克兰语"},														-- Aklanon
	["alr"] = {"阿留特语"},
	["alt"] = {"阿尔泰语"},														-- Southern Altai
	["ami"] = {"阿美语"},														-- Amis, Pangcah
	["ams"] = {"南奄美大岛语"},
--	["ang"] = {"古英语"},														-- Old English (ca. 450-1100)
	["apm"] = {"Mescalero-Chiricahua"},											-- Mescalero-Chiricahua Apache
	["arc"] = {"亚拉姆语"},
	["arq"] = {"阿尔及利亚阿拉伯语"},
	["arz"] = {"埃及阿拉伯语"},													-- Egyptian Arabic
	["ast"] = {"阿斯图里亚斯语"},												-- Asturian
	["atb"] = {"载瓦语"},
	["bal"] = {"俾路支语"},														-- Baluchi
	["bar"] = {"巴伐利亚语"},													-- Bavarian
	["bcl"] = {"中比科尔语"},													-- Central Bikol
	["bft"] = {"巴尔蒂语"},														-- Balti
	["bho"] = {"博杰普尔语"},													-- Bhojpuri
	["bin"] = {"埃多语"},														-- Bini, Edo
	["bnn"] = {"布农语"},														-- Bunun
	["bpy"] = {"比什努普里亚-曼尼普尔语"},									-- Bishnupriya, Bishnupriya Manipuri
	["brh"] = {"布拉灰语"},
	["brx"] = {"博多语"},														-- Bodo (India)
	["byq"] = {"巴赛语"},														-- Basay
	["chg"] = {"察合台突厥语"},													-- Chagatai
	["chm"] = {"Mari"},															-- Mari (Russia)
	["ckb"] = {"中库尔德语"},													-- Sorani Kurdish, Central Kurdish
    ["ckt"] = {"楚科奇语"},
    ["ckv"] = {"噶玛兰语"},														-- Kbalan, Kavalan
    ["cnr"] = {"蒙特内哥罗语"},													-- Montenegrin
	["cnu"] = {"Shenwa"},														-- Chenoua
	["coc"] = {"Cocopah"},														-- Cocopa
	["crh"] = {"克里米亚鞑靼语"},												-- Crimean Tatar, Qırımtatar
	["csu"] = {"卡舒比语"},														--
	["deu"] = {"早期德语"},														-- not in IANA; see code de
	["din"] = {"丁卡语"},														--
	["diq"] = {"扎扎其语"},														-- Dimli (individual language)
	["dng"] = {"东干语"},														--Dungan
	["dru"] = {"鲁凯语"},														-- Drekay, Rukai
	["dsb"] = {"下索布语"},														-- Lower Sorbian, dolnoserbšćina
	["duu"] = {"独龙语"},														-- Derung language
	["egy"] = {"埃及语"},														-- Egyptian (Ancient)
	["ell"] = {"现代希腊语"},													-- not in IANA; see code el
	["enm"] = {"中古英语"},														-- Middle English (1100-1500)
	["fit"] = {"梅安语"},														-- Tornedalen Finnish
	["fkv"] = {"克文语"},														-- Kven Finnish
	["fos"] = {"西拉雅语"},														-- Siraya
	["frk"] = {"古法兰克语"},													-- Frankish
	["frm"] = {"中古法语"},														-- Middle French (ca. 1400-1600)
	["fro"] = {"古法语"},														-- Old French (842-ca. 1400)
	["frr"] = {"北弗里斯兰语"},													-- North Frisian, Frasch, Fresk, Freesk, Friisk
	["fry"] = {"西菲士兰语"},													-- not in IANA; see code fy
    ["gcf"] = {"瓜德罗普克里奥尔语"},                                             -- Guadeloupean Creole
	["gcr"] = {"法属圭亚那克里奥尔语"},
	["gez"] = {"吉兹语"},														-- Geez
	["gju"] = {"古吉尔语 "},													-- Gujari
	["gmh"] = {"中古高地德语"},													-- Middle High German (ca. 1050-1500)
	["goh"] = {"古高地德语"},													-- Old High German (ca. 750-1050)
	["got"] = {"哥德语"},														-- Gothic, Gutisk
	["grc"] = {"古希腊语"},														-- Ancient Greek (to 1453)
	["gsw"] = {"阿勒曼尼语"},													-- Swiss German, Alemannic, Alsatian
	["gul"] = {"Gullah"},														-- Sea Island Creole English
	["hak"] = {"客家语"},														-- Hakka Chinese
	["hbo"] = {"圣经希伯来语"},													-- Ancient Hebrew
	["hbs"] = {"塞尔维亚-克罗地亚语"},										-- Serbo-Croatian
	["hnd"] = {"Hindko"},														-- Southern Hindko
	["hoc"] = {"霍语"},															-- Ho, Bihar Ho, Lanka Kol
	["ikt"] = {"Inuvialuk"},													-- Inuinnaqtun, Western Canadian Inuktitut
	["ilo"] = {"伊洛卡诺语"},													-- Iloko
	["inh"] = {"印古什语"},														-- Ingush
	["kaa"] = {"Karakalpak"},													-- Kara-Kalpak
	["kae"] = {"凯达格兰语"},													--
	["kan"] = {"康纳达语"},														-- Kannada
	["khb"] = {"傣仂语"},														-- Tai Lue, Tai Lɯ, Tai Lü, Thai Lue, Tai Le
	["kmr"] = {"北库德语"},														-- Northern Kurdish
	["knn"] = {"孔卡尼语"},														-- Konkani (individual language)
	["kok"] = {"孔卡尼语"},														-- Konkani (macrolanguage)
	["kpo"] = {"科普索语"},														-- Kposo, Ikposo
    ["kpy"] = {"科里亚克语"},
	["krj"] = {"Kinaray-a"},													-- Kinaray-A
	["ksh"] = {"利普里安语"},													-- Ripuarian, Kölsch;  --ksh is the code of Colognian, but ksh.wiki is the Ripuarian Wikipedia
	["ksw"] = {"斯高克伦语"},													-- S'gaw Karen
	["ktz"] = {"Juǀ'hoan"},														-- Ju/'hoan, Juǀʼhoan, Juǀʼhoansi
	["kzg"] = {"喜界语"},														-- Kikai
	["lbj"] = {"拉达克语"},														-- Ladakhi
	["lez"] = {"列兹金语"},														-- Lezgian, Lezghian
	["lij"] = {"利古里亚语"},
	["liv"] = {"立窝尼亚语"},													-- Livonian, Liv
	["lkt"] = {"拉科塔语"},														-- Lakota
	["lng"] = {"伦巴底语"},														-- Lombardic, Langobardic
	["lzz"] = {"拉兹语"},														-- Laz
	["maz"] = {"马索维亚语"},													-- Central Mazahua
	["mag"] = {"摩揭陀语"},														-- Magahi
	["mdf"] = {"莫克沙语"},														-- Moksha
	["mga"] = {"中古爱尔兰语"},													-- Middle Irish (900-1200)
	["mhr"] = {"Mari"},															-- Eastern Mari
	["mia"] = {"Miami-Illinois"},												-- Miami
	["min"] = {"米南佳保语"},        -- Minangkabau
	["miq"] = {"Miskito"},														-- Mískito
	["mix"] = {"Mixtec"},														-- Mixtepec Mixtec
	["mjw"] = {"卡尔比语"},														-- Karbi
--	["mla"] = {"中世纪拉丁语"},												-- Malo; clearly a misuse of code mla;
	["mni"] = {"曼尼普尔语"},													-- Manipuri, Meitei
	["mol"] = {"摩尔多瓦语", "摩尔达维亚语"},									-- Moldavian, Moldovan (639-3, both retired)
	["mrj"] = {"山地马里语"},													-- Western Mari
	["mww"] = {"白苗话"},														-- Hmong Daw
	["mzn"] = {"马赞德兰语"},													-- Mazanderani
	["nan"] = {"闽南语"},														-- Min Nan Chinese
	["naq"] = {"科伊科伊语"},														-- Khoekhoe, Nama (Namibia); same as first in IANA list, delete?
--	["naz"] = {"North Azeri"},													-- Coatepec Nahuatl; clearly a misuse of code naz
	["nci"] = {"古典纳瓦特尔语"},												-- Classical Nahuatl; same, delete?
	["nds"] = {"低地德语"},														-- Low German, Low Saxon, Plattdeutsch, Plattdüütsch
	["nds-nl"] = {"低萨克森荷兰语"},											-- Dutch Low Saxon, Low German, Low Saxon; as spoken in the Netherlands; see code nsd
	["new"] = {"尼瓦尔语"},														-- Newari, Nepal Bhasa
	["non"] = {"古诺斯语"},
	["nod"] = {"北部泰语"},														-- Northern Thai, Lanna, Kam Mueang
	["nrf"] = {"泽西语"},														-- Jèrriais
--	["nrm"] = {"诺曼语"},														-- Narom; clearly a misuse of code nrm
--	["nsd"] = {"低萨克森荷兰语"},												-- Dutch Low Saxon, Southern Nisu; how can this be right? typo related to code nds-nl?
	["nso"] = {"北索托语"},														-- Pedi, Northern Sotho, Sepedi
	["nwc"] = {"古典尼瓦尔语"},													-- Classical Newari, Classical Nepal Bhasa, Old Newari
	["oci"] = {"普罗旺斯方言"},													-- oc
	["okn"] = {"冲永良部语"},													-- Okinoerabu dialect cluster, Shimamuni
	["oko"] = {"新罗语"},
	["ood"] = {"O'odham"},														-- Tohono O'odham
	["orv"] = {"古东斯拉夫语"},        -- Old East Slavic
	["ota"] = {"鄂图曼土耳其语"},												-- Ottoman Turkish (1500-1928)
	["otk"] = {"古突厥语"},														-- Old Turkish
	["oty"] = {"古泰米尔语"},
	["owl"] = {"古威尔斯语"},													-- Old Welsh
	["pal"] = {"中古波斯语"},												-- Pahlavi
	["pam"] = {"邦板牙语"},													-- Pampanga, Kapampangan
	["pcd"] = {"皮卡第语"},
	["peo"] = {"古波斯语"},													-- Old Persian (ca. 600-400 B.C.)
	["phr"] = {"博德瓦尔语"},														-- Pahari-Potwari
	["phn"] = {"腓尼基语"},		                                                -- Phoenician
	["pka"] = {"普拉克里特诸语言"},													-- Ardhamāgadhī Prākrit
	["pms"] = {"皮埃蒙特语"},
	["pnb"] = {"旁遮普语"},														-- Western Panjabi
	["prs"] = {"达利语"},
	["psu"] = {"索拉塞那语"},													-- Sauraseni Prākrit
	["ppu"] = {"拍瀑拉语", "洪雅语"},											-- Papura, Hoany
	["pwn"] = {"排湾语"},														-- Pinayuanan, Paiwan
	["pyu"] = {"卑南语"},														-- Pinuyumayan, Puyuma
	["rap"] = {"拉帕努伊语"},														-- Rapanui
	["rar"] = {"库克群岛毛利语"},												-- Rarotongan, Cook Islands Maori
	["rcf"] = {"留尼旺克里奥尔语"},
	["rmu"] = {"Scandoromani"},													-- Tavringer Romani
	["rom"] = {"罗姆语"},														-- Romany
	["rup"] = {"阿罗蒙语"},														-- Macedo-Romanian, Aromanian, Arumanian
	["rus"] = {"俄语"},															-- not in IANA; see code ru
	["rut"] = {"鲁图尔语"},														-- Rutul
	["ryn"] = {"北奄美大岛语"},
	["rys"] = {"八重山语"},														-- Yaeyama
	["ryu"] = {"冲绳语"},														-- Central Okinawan
	["sah"] = {"雅库特语"},														-- Yakut 又译作萨哈语
	["sco"] = {"低地苏格兰语"},													-- Scots, Lowland Scots
	["scn"] = {"西西里语"},
	["sdc"] = {"萨沙里语"},														-- Sassarese Sardinian
	["sdn"] = {"加卢拉方言"},													-- Gallurese Sardinian
	["sga"] = {"古爱尔兰语"},													-- Old Irish (to 900)
	["sgs"] = {"萨莫吉提亚语"},													-- Samogitian dialect, Žemaitiu ruoda
	["shn"] = {"掸语"},															-- Shan
	["shp"] = {"Shipibo"},														-- Shipibo-Conibo
	["sip"] = {"锡金语"},														-- Sikkimese
    ["smj"] = {"吕勒萨米语"},                                                    -- Lule Sámi
	["smn"] = {"伊纳里萨米语"},
	["sms"] = {"斯科尔特萨米语"},												-- Skolt Sami
	["skr"] = {"Saraiki"},														-- Saraiki, Seraiki; same as first in IANA list, delete?
	["src"] = {"劳古多罗方言"},													-- Logudorese Sardinian
	["sro"] = {"坎皮达诺方言"},													-- Campidanese Sardinian
	["stq"] = {"萨特菲士兰语"},
	["swg"] = {"施瓦本方言"},
	["sxr"] = {"拉阿鲁哇语"},													-- Hla'alua, Saaroa
	["syc"] = {"古叙利亚语"},													-- Classical Syriac
	["syr"] = {"叙利亚语"},														-- Syriac
	["szy"] = {"撒奇莱雅语"},													-- Sakizaya
	["tab"] = {"塔巴萨兰语"},													-- Tabasaran
	["tao"] = {"达悟语"},														-- Cizicizing No Tao、Ireriak No Tao, Yami
	["tay"] = {"泰雅语"},														-- Atayal, Tayal
	["tcy"] = {"图陆语"},														-- Tulu, Tulu bāse
	["tet"] = {"德顿语"},														-- Tetum
	["tkl"] = {"托克劳语"},														-- Tokelau
	["tkn"] = {"德之岛语"},														-- Tokunoshima
	["tmh"] = {"图阿雷格语"},													-- Tamashek
	["tpi"] = {"巴布亚皮钦语"},													-- Tok Pisin
	["trv"] = {"德路固语", "太鲁阁语"},											-- Truku, Sejiq Truku
	["tsu"] = {"邹语"},															-- Cou, Tsou
	["tvl"] = {"图瓦卢语"},														-- Tuvalu
	["tyv"] = {"图瓦语"},														-- Tuvinian
	["uby"] = {"尤比克语"},														-- Ubykh
	["uun"] = {"巴宰语"},														-- Pazeh, Kulon (龟仑语) is its dialect
	["vls"] = {"西弗拉芒方言"},													-- Vlaams
	["vec"] = {"威尼斯语"},
	["war"] = {"瓦瑞语"},														-- Waray (Philippines)
	["wep"] = {"威斯特法伦方言"},                                                -- Westphalien
	["wo"] = {"沃洛夫语"},                                                      -- Wolof
	["xal"] = {"卫拉特语", "瓦剌语"},											-- Kalmyk, Oirat
	["xal-RU"] = {"卡尔梅克卫拉特语"},											-- Kalmyk Oirat
	["xcl"] = {"古典亚美尼亚语"},												-- Classical Armenian
	["xct"] = {"近古藏语"},														-- Classical Tibetan
	["xmf"] = {"明格列尔语"},													-- Mingrelian
	["xnb"] = {"卡那卡那富语"},													-- Kanakanavu
	["xpp"] = {"百济语"},														-- Baekje
	["xpu"] = {"布匿语"},														-- Punic
	["xsr"] = {"夏尔巴语"},														-- Sherpa
	["xsy"] = {"赛夏语"},														-- Saisiyat
	["xug"] = {"国头语"},														-- Kunigami
	["xwo"] = {"书面瓦剌语"},													-- Written Oirat
	["yoi"] = {"与那国语"},														-- Yonaguni
	["yox"] = {"与论语"},														-- Yoron
	["yua"] = {"犹加敦马雅语"},													-- Yucateco, Yucatec Maya
	["yue"] = {"粤语"},
    ["zea"] = {"西兰语"},														-- Zeêuw, Zealandic
    ["zkg"] = {"高句丽语"},
    ["zne"] = {"赞德语"},														-- Zande

-- non-standard codes
	["bat-smg"] = {"萨莫吉提亚语"},												-- bat = Baltic languages (639-2); dialect of Lithuanian has it's own IANA code sgs; bat-smg
	["be-x-old "] = {"白俄罗斯语 (旧正写法)"},								-- be = Belarusian; x-old = private use tag; be-x-old.wikipedia.org; space char in index may indicate that this code not used
	["cbk-zam"] = {"查瓦卡诺语"},												-- cbk = Chavacano; zam = Zamboangueño? zam is not an IANA-registered extlang; cbk-zam.wikipedia.org
--	["cg"] = {"Montenegrin", "sr-ME"},											-- IANA / ISO 639-3 code is cnr
	["en-emodeng"] = {"近代英语"},									-- emodeng is not an IANA-registered variant
	["fiu-vro"] = {"沃罗语"},														-- fiu = Finno-Ugrian languages (639-2); vro = Võro (639-3); fiu-vro.wikipedia.org
	["fr-gallo"] = {"加洛语"},
	["gkm"] = {"中世纪希腊语", "grc"},
	["grc-gre"] = {"希腊语", "grc"},												-- grc = Ancient Greek (to 1453); gre not an IANA-registered code; used by Template:lang-grc-gre
    ["gsw-fr"] = {"阿尔萨斯语"},
	["hbs-Cyrl"] = {"塞尔维亚-克罗地亚语", "hbs"},
	["hbs-Latn"] = {"塞尔维亚-克罗地亚语", "hbs"},
	["map-bms"] = {"Banyumasan"},												-- dialect of Javanese; map = Austronesian languages (639-2); bms is an IANA registered code not related to Javanese; map-bms.wikipedia.org
	["oc-auvern"] = {"奥弗涅方言"},
	["oc-gascon"] = {"加斯科涅语"},
	["oc-lemosin"] = {"利穆赞方言"},
	["oc-provenc"] = {"普罗旺斯方言"},
	["oc-vivaraup"] = {"维瓦赖-阿尔卑斯方言"},
	["roa-rup"] = {"阿罗马尼亚语"},												-- roa = Romance languages (639-2); rup = Macedo-Romanian, Aromanian, Arumanian (639-3); roa-rup.wikipedia.org
	["roa-tara"] = {"塔伦蒂诺语"},												-- roa = Romance languages (639-2); tara is not an IANA registered script; roa-tara.wikipedia.org
	["simple"] = {"简单英语"},													-- simple is not an IANA registered variant; simple.wikipedia.org
	["zh-classical"] = {"文言"},												-- zh = Chinese; classical is not an IANA-registered variant; zh-classical.wikipedia.org
	["zh-min-nan"] = {"闽南语"},												-- zh-min-nan = Minnan, Hokkien, Amoy, Taiwanese, Southern Min, Southern Fujian, Hoklo, Southern Fukien, Ho-lo; granfathered in IANA, nan preferred; zh-min-nan.wikipedia.org
	["zh-yue"] = {"粤语"},

	["grc-x-aeolic"] = {"伊欧里斯希腊语"},										-- these grc-x-... codes are preferred alternates to the non-standard catchall code grc-gre
	["grc-x-attic"] = {"阿提卡希腊语"},
	["grc-x-biblical"] = {"圣经希腊语"},
	["grc-x-byzant"] = {"拜占庭希腊语"},
	["grc-x-classic"] = {"古典希腊语"},
	["grc-x-doric"] = {"多利亚希腊语"},
	["grc-x-hellen"] = {"希利尼话"},
	["grc-x-ionic"] = {"爱奥尼亚希腊语"},
	["grc-x-koine"] = {"通用希腊语"},
	["grc-x-medieval"] = {"中古希腊语"},
	["grc-x-patris"] = {"教父希腊语"},
	["grk-x-proto"] = {"原始希腊语"},											-- grk in IANA is Greek languages
	["iir-x-proto"] = {"原始印度-伊朗语"},									-- iir in IANA is Indo-Iranian Languages
	["ira-x-proto"] = {"原始伊朗语"},										-- ira in IANA is Iranian languages
	["itc-x-proto"] = {"原始意大利语"},											-- itc in IANA is Italic languages
	["sla-x-proto"] = {"原始斯拉夫语"},											-- sla in IANA is Slavic languages
	["yuf-x-hav"] = {"Havasupai"},												-- IANA name for these three is Havasupai-Walapai-Yavapai
	["yuf-x-wal"] = {"Walapai"},
	["yuf-x-yav"] = {"Yavapai"},
	}


--[[--------------------------< A R T I C L E _ L I N K >------------------------------------------------------

for those rare occasions when article titles don't fit with the normal '<language name>-language', this table
maps language code to article title. Use of this table should be avoided and the use of redirects preferred as
that is the long-standing method of handling article names that don't fit with the normal pattern

]]

local article_name = {
	['kue'] = "Kuman language (New Guinea)",									-- Kuman (Papua New Guinea); to avoid Kuman dab page
	["lij"] = "Ligurian (Romance language)",									-- Ligurian; see Template_talk:Lang#Ligurian_dab
	['mnh'] = "Mono language (Congo)",											-- Mono (Democratic Republic of Congo); see Template_talk:Lang#Mono_languages
	['mnr'] = "Mono language (California)",										-- Mono (USA)
	['mru'] = "Mono language (Cameroon)",										-- Mono (Cameroon)
	['qwm'] = "Kuman (Russia)",													-- Kuman (Russia); to avoid Kuman dab page
	["snq"] = "Sangu language (Gabon)",											-- Sangu (Gabon)
	["xlg"] = "Ligurian (ancient language)",									-- see Template_talk:Lang#Ligurian_dab
	}


--[=[-------------------------< R T L _ S C R I P T S >--------------------------------------------------------

ISO 15924 scripts that are written right-to-left. Data in this table taken from [[ISO 15924#List of codes]]

last update to this list: 2017-12-24

]=]

local rtl_scripts = {
	'adlm', 'arab', 'aran', 'armi', 'avst', 'cprt', 'egyd', 'egyh', 'hatr', 'hebr',
	'hung', 'inds', 'khar', 'lydi', 'mand', 'mani', 'mend', 'merc', 'mero', 'narb',
	'nbat', 'nkoo', 'orkh', 'palm', 'phli', 'phlp', 'phlv', 'phnx', 'prti', 'rohg',
	'samr', 'sarb', 'sogd', 'sogo', 'syrc', 'syre', 'syrj', 'syrn', 'thaa', 'wole',
	};


--[[--------------------------< T R A N S L I T _ T I T L E S >------------------------------------------------

This is a table of tables of transliteration standards and the language codes or language scripts that apply to
those standards. This table is used to create the tool-tip text associated with the transliterated text displayed
by some of the {{lang-??}} templates.

These tables are more-or-less copied directly from {{transl}}. The standard 'NO_STD' is a construct to allow for
the cases when no |std= parameter value is provided.

]]

local translit_title_table = {
	['ahl'] = {
		['default'] = 'Academy of the Hebrew Language transliteration',
		},

	['ala'] = {
		['default'] = 'American Library Association – Library of Congress transliteration',
		},

	['ala-lc'] = {
		['default'] = 'American Library Association – Library of Congress transliteration',
		},

	['batr'] = {
		['default'] = 'Bikdash Arabic Transliteration Rules',
		},

	['bgn/pcgn'] = {
		['default'] = 'Board on Geographic Names / Permanent Committee on Geographical Names transliteration',
		},

	['din'] = {
		['ar'] = 'DIN 31635 Arabic',
		['fa'] = 'DIN 31635 Arabic',
		['ku'] = 'DIN 31635 Arabic',
		['ps'] = 'DIN 31635 Arabic',
		['tg'] = 'DIN 31635 Arabic',
		['ug'] = 'DIN 31635 Arabic',
		['ur'] = 'DIN 31635 Arabic',
		['arab'] = 'DIN 31635 Arabic',

		['default'] = 'DIN transliteration',
		},

	['eae'] = {
		['default'] = 'Encyclopaedia Aethiopica transliteration',
		},

	['hepburn'] = {
		['default'] = 'Hepburn transliteration',
		},

	['hunterian'] = {
		['default'] = 'Hunterian transliteration',
		},

	['iast'] = {
		['default'] = 'International Alphabet of Sanskrit transliteration',
		},

	['iso'] = {																	-- when a transliteration standard is supplied
		['ab'] = 'ISO 9 Cyrillic',
		['ba'] = 'ISO 9 Cyrillic',
		['be'] = 'ISO 9 Cyrillic',
		['bg'] = 'ISO 9 Cyrillic',
		['kk'] = 'ISO 9 Cyrillic',
		['ky'] = 'ISO 9 Cyrillic',
		['mn'] = 'ISO 9 Cyrillic',
		['ru'] = 'ISO 9 Cyrillic',
		['tg'] = 'ISO 9 Cyrillic',
		['uk'] = 'ISO 9 Cyrillic',
		['bua'] = 'ISO 9 Cyrillic',
		['sah'] = 'ISO 9 Cyrillic',
		['tut'] = 'ISO 9 Cyrillic',
		['xal'] = 'ISO 9 Cyrillic',
		['cyrl'] = 'ISO 9 Cyrillic',

		['ar'] = 'ISO 233 Arabic',
		['ku'] = 'ISO 233 Arabic',
		['ps'] = 'ISO 233 Arabic',
		['ug'] = 'ISO 233 Arabic',
		['ur'] = 'ISO 233 Arabic',
		['arab'] = 'ISO 233 Arabic',

		['he'] = 'ISO 259 Hebrew',
		['yi'] = 'ISO 259 Hebrew',
		['hebr'] = 'ISO 259 Hebrew',

		['el'] = 'ISO 843 Greek',
		['grc'] = 'ISO 843 Greek',

		['ja'] = 'ISO 3602 Japanese',
		['hira'] = 'ISO 3602 Japanese',
		['hrkt'] = 'ISO 3602 Japanese',
		['jpan'] = 'ISO 3602 Japanese',
		['kana'] = 'ISO 3602 Japanese',

		['zh'] = 'ISO 7098 Chinese',
		['chi'] = 'ISO 7098 Chinese',
		['pny'] = 'ISO 7098 Chinese',
		['zho'] = 'ISO 7098 Chinese',
--		['han'] = 'ISO 7098 Chinese',											-- unicode alias of Hani? doesn't belong here? should be Hani?
		['hans'] = 'ISO 7098 Chinese',
		['hant'] = 'ISO 7098 Chinese',

		['ka'] = 'ISO 9984 Georgian',
		['kat'] = 'ISO 9984 Georgian',

		['arm'] = 'ISO 9985 Armenian',
		['hy'] = 'ISO 9985 Armenian',

		['th'] = 'ISO 11940 Thai',
		['tha'] = 'ISO 11940 Thai',

		['ko'] = 'ISO 11941 Korean',
		['kor'] = 'ISO 11941 Korean',

		['awa'] = 'ISO 15919 Indic',
		['bho'] = 'ISO 15919 Indic',
		['bn'] = 'ISO 15919 Indic',
		['bra'] = 'ISO 15919 Indic',
		['doi'] = 'ISO 15919 Indic',
		['dra'] = 'ISO 15919 Indic',
		['gon'] = 'ISO 15919 Indic',
		['gu'] = 'ISO 15919 Indic',
		['hi'] = 'ISO 15919 Indic',
		['hno'] = 'ISO 15919 Indic',
		['inc'] = 'ISO 15919 Indic',
		['kn'] = 'ISO 15919 Indic',
		['kok'] = 'ISO 15919 Indic',
		['ks'] = 'ISO 15919 Indic',
		['mag'] = 'ISO 15919 Indic',
		['mai'] = 'ISO 15919 Indic',
		['ml'] = 'ISO 15919 Indic',
		['mr'] = 'ISO 15919 Indic',
		['ne'] = 'ISO 15919 Indic',
		['new'] = 'ISO 15919 Indic',
		['or'] = 'ISO 15919 Indic',
		['pa'] = 'ISO 15919 Indic',
		['pnb'] = 'ISO 15919 Indic',
		['raj'] = 'ISO 15919 Indic',
		['sa'] = 'ISO 15919 Indic',
		['sat'] = 'ISO 15919 Indic',
		['sd'] = 'ISO 15919 Indic',
		['si'] = 'ISO 15919 Indic',
		['skr'] = 'ISO 15919 Indic',
		['ta'] = 'ISO 15919 Indic',
		['tcy'] = 'ISO 15919 Indic',
		['te'] = 'ISO 15919 Indic',
		['beng'] = 'ISO 15919 Indic',
		['brah'] = 'ISO 15919 Indic',
		['deva'] = 'ISO 15919 Indic',
		['gujr'] = 'ISO 15919 Indic',
		['guru'] = 'ISO 15919 Indic',
		['knda'] = 'ISO 15919 Indic',
		['mlym'] = 'ISO 15919 Indic',
		['orya'] = 'ISO 15919 Indic',
		['sinh'] = 'ISO 15919 Indic',
		['taml'] = 'ISO 15919 Indic',
		['telu'] = 'ISO 15919 Indic',

		['default'] = 'ISO transliteration',
		},

	['jyutping'] = {
		['default'] = 'Jyutping transliteration',
		},

	['mlcts'] = {
		['default'] = 'Myanmar Language Commission Transcription System',
		},

	['mr'] = {
		['default'] = 'McCune–Reischauer transliteration',
		},

	['nihon-shiki'] = {
		['default'] = 'Nihon-shiki transliteration',
		},

	['no_std'] = {																-- when no transliteration standard is supplied
		['akk'] = 'Semitic transliteration',
		['sem'] = 'Semitic transliteration',
		['phnx'] = 'Semitic transliteration',
		['xsux'] = 'Cuneiform transliteration',
		},

	['pinyin'] = {
		['default'] = 'Pinyin transliteration',
		},

	['rr'] = {
		['default'] = 'Revised Romanization of Korean transliteration',
		},

	['rtgs'] = {
		['default'] = 'Royal Thai General System of Transcription',
		},

	['satts'] = {
		['default'] = 'Standard Arabic Technical Transliteration System transliteration',
		},

	['scientific'] = {
		['default'] = 'scientific transliteration',
		},

	['ukrainian'] = {
		['default'] = 'Ukrainian National system of romanization',
		},

	['ungegn'] = {
		['default'] = 'United Nations Group of Experts on Geographical Names transliteration',
		},

	['wadegile'] = {
		['default'] = 'Wade–Giles transliteration',
		},

	['wehr'] = {
		['default'] = 'Hans Wehr transliteration',
		},
	};


return
	{
	this_wiki_lang_tag = this_wiki_lang_tag,
	this_wiki_lang_dir = lang_obj:getDir(),										-- wiki's language direction

	article_name = article_name,
	lang_name_table = lang_name_table_t,
	override = override,
	rtl_scripts = rtl_scripts,
	special_tags_table = special_tags_table,
	translit_title_table = translit_title_table,
	};