Module:Language/data/ISO 639 override/sandbox
Documentation for this module may be created at Module:Language/data/ISO 639 override/sandbox/doc
--[[
this module holds shared override data for Module Lang and Module ISO 639 name
The data in the tables was taken from Module:Language/data/ISO 639 override, Module:Lang/data and from
Module:Language/data/wp_languages.
Data from Module:Language/data/ISO 639 override and Module:Lang/data are combined because the provenance of
those data is known. It is desireable to keep the ~/wp_languages data segregated because the provenance of
those data is not know so should be preserved separately.
]]
--[[--------------------------< O V E R R I D E _ 1 >----------------------------------------------------------
Language codes and names in this table override the ISO 639-1 names in: Module:Language/data/iana languages
Used by Lang and ISO 639 name
]]
local override_1 = {
["bo"] = {"Standard Tibetan"}, -- Tibetan; en.wiki preferred
["cu"] = {"Church Slavonic"}, -- 2nd IANA name;
["el"] = {"Greek"}, -- Modern Greek (1453-)
["fy"] = {"West Frisian"}, -- Western Frisian
["ht"] = {"Haitian Creole"}, -- Haitian; en.wiki preferred
["mo"] = {"Moldovan"}, -- Moldavian (deprecated code); to match en.wiki article title; here because Lang and ISO 639 do not share deprecated data
["ps"] = {"Pashto"}, -- Pushto
["st"] = {"Sotho"}, -- Southern Sotho; match ISO 639-2; en.wiki preferred
["to"] = {"Tongan"}, -- Tonga (Tonga Islands); en.wiki preferred
-- these ISO 639-1 language-name overrides imported from Module:Language/data/wp_languages
--<begin do-not-edit except to comment out>--
["av"] = {"Avar"}, -- Avaric
-- ["bo"] = {"Standard Tibetan"}, -- Tibetan
-- ["el"] = {"Greek"}, -- Modern Greek
["ff"] = {"Fula"}, -- Fulah
-- ["ht"] = {"Haitian Creole"}, -- Haitian
["hz"] = {"Otjiherero"}, -- Herero
["ii"] = {"Yi"}, -- Sichuan Yi
["ki"] = {"Gikuyu"}, -- Kikuyu
["kl"] = {"Greenlandic"}, -- Kalaallisut
["ky"] = {"Kyrgyz"}, -- Kirghiz
["lg"] = {"Luganda"}, -- Ganda
["li"] = {"Limburgish"}, -- Limburgan
["mi"] = {"Māori"}, -- Maori
["na"] = {"Nauruan"}, -- Nauru
["nb"] = {"Bokmål"}, -- Norwegian Bokmål
["nd"] = {"Northern Ndebele"}, -- North Ndebele
["nn"] = {"Nynorsk"}, -- Norwegian Nynorsk
["nr"] = {"Southern Ndebele"}, -- South Ndebele
["ny"] = {"Chichewa"}, -- Nyanja
["oj"] = {"Ojibwe"}, -- Ojibwa
["or"] = {"Odia"}, -- Oriya
["pa"] = {"Punjabi"}, -- Panjabi
["rn"] = {"Kirundi"}, -- Rundi
["sl"] = {"Slovene"}, -- Slovenian
["ss"] = {"Swazi"}, -- Swati
-- ["st"] = {"Sotho"}, -- Southern Sotho
-- ["to"] = {"Tongan"}, -- Tonga
--<end do-not-edit except to comment out>--
}
--[[--------------------------< O V E R R I D E _ 2 >----------------------------------------------------------
Language codes and names in this table override the ISO 639-2 names in: Module:Language/data/ISO 639-2
Used by Lang and ISO 639 name; for Lang, these codes must be filtered to remove ISO 639-1 synonyms
]]
local override_2 = {
["arc"] = {"Aramaic"}, -- Official Aramaic (700-300 BCE), Imperial Aramaic (700-300 BCE);
["art"] = {"constructed"}, -- to match en.wiki article; lowercase for category name
["bla"] = {"Blackfoot"}, -- Siksika; to match en.wiki article title
["bod"] = {"Standard Tibetan"}, -- Tibetan; en.wiki preferred
["bua"] = {"Buryat"}, -- Buriat; this is a macro language
["egy"] = {"Ancient Egyptian"}, -- Egyptian (Ancient)
["ell"] = {"Greek"}, -- Greek, Modern (1453-)
["frr"] = {"North Frisian"}, -- Northern Frisian
["frs"] = {"East Frisian Low Saxon"}, -- Eastern Frisian
["hat"] = {"Haitian Creole"}, -- Haitian; en.wiki preferred
["ilo"] = {"Ilocano"}, -- Iloko; to match en.wiki article title
["nbl"] = {"Southern Ndebele"}, -- Ndebele, South or South Ndebele; en.wiki preferred
["nde"] = {"Northern Ndebele"}, -- Ndebele, North or North Ndebele; en.wiki preferred
["nob"] = {"Norwegian Bokmål"}, -- Bokmål, Norwegian or Norwegian Bokmål
["nzi"] = {"Nzema"}, -- Nzima; to match en.wiki article title
["pro"] = {"Old Occitan (to 1500)"}, -- Provençal, Old (to 1500) or Occitan, Old (to 1500); 2nd iana name
["sot"] = {"Sotho"}, -- Sotho, Southern; en.wiki preferred
["ton"] = {"Tongan"}, -- Tonga (Tonga Islands); en.wiki preferred
["und"] = {"undetermined"}, -- capitalization to match existing category
-- these ISO 639-2 overrides imported from Module:Language/data/wp_languages
--<begin do-not-edit except to comment out>--
["ace"] = {"Acehnese"}, -- Achinese
["alt"] = {"Altay"}, -- Southern Altai
["bal"] = {"Balochi"}, -- Baluchi
["bin"] = {"Edo"}, -- Bini
["chg"] = {"Chagatay"}, -- Chagatai
["gez"] = {"Ge'ez"}, -- Geez
["gsw"] = {"Alemannic German"}, -- Swiss German
["kaa"] = {"Karakalpak"}, -- Kara-Kalpak
["lez"] = {"Lezgian"}, -- Lezghian
["mni"] = {"Meitei"}, -- Manipuri
["new"] = {"Nepal Bhasa"}, -- Newari
["nso"] = {"Northern Sotho"}, -- Pedi
["nwc"] = {"Classical Nepal Bhasa"}, -- Classical Newari
["pal"] = {"Middle Persian"}, -- Pahlavi
["pam"] = {"Kapampangan"}, -- Pampanga
["rap"] = {"Rapa Nui"}, -- Rapanui
["rar"] = {"Cook Islands Māori"}, -- Rarotongan
["rom"] = {"Romani"}, -- Romany
["rup"] = {"Aromanian"}, -- Macedo-Romanian
["tkl"] = {"Tokelauan"}, -- Tokelau
["tvl"] = {"Tuvaluan"}, -- Tuvalu
["tyv"] = {"Tuvan"}, -- Tuvinian
["xal"] = {"Oirat"}, -- Kalmyk
--<end do-not-edit except to comment out>--
}
--[[--------------------------< O V E R R I D E _ 2 B >--------------------------------------------------------
Language codes and names in this table override the ISO 639-2B names in: Module:Language/data/ISO 639-2B
Used by ISO 639 name only
]]
local override_2B = {
["gre"] = {"Greek"}, -- Greek, Modern (1453-)
["tib"] = {"Standard Tibetan"}, -- en.wiki preferred; Tibetan
}
--[[--------------------------< O V E R R I D E _ 3 >----------------------------------------------------------
Language codes and names in this table override the ISO 639-3 names in: Module:Language/data/ISO 639-3
Used by Lang and ISO 639 name; for Lang, these codes must be filtered to remove ISO 639-1 synonyms
]]
local override_3 = {
["arc"] = {"Aramaic"}, -- Official Aramaic (700-300 BCE), Imperial Aramaic (700-300 BCE);
["bhd"] = {"Bhadarwahi"}, -- Bhadrawahi; to match en.wiki article title
["bla"] = {"Blackfoot"}, -- Siksika; to match en.wiki article title
["bod"] = {"Standard Tibetan"}, -- Tibetan; en.wiki preferred
["bua"] = {"Buryat"}, -- Buriat; this is a macro language; these four use wp preferred transliteration;
["bxm"] = {"Mongolian Buryat"}, -- Mongolia Buriat; these three all redirect to Buryat
["bxr"] = {"Russian Buryat"}, -- Russia Buriat;
["bxu"] = {"Chinese Buryat"}, -- China Buriat;
["byr"] = {"Yipma"}, -- Baruya, Yipma
["egy"] = {"Ancient Egyptian"}, -- Egyptian (Ancient); distinguish from contemporary arz: Egyptian Arabic; already listed
["ell"] = {"Greek"}, -- Modern Greek (1453-)
["frr"] = {"North Frisian"}, -- Northern Frisian
["frs"] = {"East Frisian Low Saxon"}, -- Eastern Frisian
["hat"] = {"Haitian Creole"}, -- en.wiki preferred; Haitian; en.wiki preferred
["ilo"] = {"Ilocano"}, -- Iloko; to match en.wiki article title
["jam"] = {"Jamaican Patois"}, -- Jamaican Creole English
["mhr"] = {"Meadow Mari"}, -- Eastern Mari
["mid"] = {"Modern Mandaic"}, -- Mandaic
["mla"] = {"Tamambo"}, -- Malo
['mte'] = {"Mono-Alu"}, -- en.wiki preferred; Mono (Solomon Islands); en.wiki preferred
["nbl"] = {"Southern Ndebele"}, -- South Ndebele
["nde"] = {"Northern Ndebele"}, -- North Ndebele
["nrf"] = {"Norman"}, -- not quite a collective - IANA name: Jèrriais; categorizes to Norman-language text
["nzi"] = {"Nzema"}, -- Nzima; to match en.wiki article title
["orv"] = {"Old East Slavic"}, -- Old Russian
["pfl"] = {"Palatine German"}, -- Pfaelzisch; to match en.wiki article
["pms"] = {"Piedmontese"}, -- ISO 639-3 name is Piemontese; to match en.wiki article title
["pnb"] = {"Punjabi (Western)"}, -- Western Panjabi; dab added to override import from ~/wp languages and distinguish pnb from pa in reverse look up tag_from_name()
["sot"] = {"Sotho"}, -- Southern Sotho; match ISO 639-2; en.wiki preferred
["stq"] = {"Saterland Frisian"}, -- Saterfriesisch
["ton"] = {"Tongan"}, -- en.wiki preferred; Tonga (Tonga Islands)
["und"] = {"undetermined"}, -- capitalization to match existing category
["wrg"] = {"Warrongo"}, -- Warungu
["xgf"] = {"Tongva"}, -- ISO 639-3 is Gabrielino-Fernandeño
-- these ISO 639-3 language-name overrides imported from Module:Language/data/wp_languages
--<begin do-not-edit except to comment out>--
["ace"] = {"Acehnese"}, -- Achinese
["aec"] = {"Sa'idi Arabic"}, -- Saidi Arabic
["akl"] = {"Aklan"}, -- Aklanon
["alt"] = {"Altay"}, -- Southern Altai
["apm"] = {"Mescalero-Chiricahua"}, -- Mescalero-Chiricahua Apache
["bal"] = {"Balochi"}, -- Baluchi
["bcl"] = {"Central Bicolano"}, -- Central Bikol
["bin"] = {"Edo"}, -- Bini
["bpy"] = {"Bishnupriya Manipuri"}, -- Bishnupriya
["chg"] = {"Chagatay"}, -- Chagatai
["ckb"] = {"Sorani Kurdish"}, -- Central Kurdish
["cnu"] = {"Shenwa"}, -- Chenoua
["coc"] = {"Cocopah"}, -- Cocopa
["diq"] = {"Zazaki"}, -- Dimli
["fit"] = {"Meänkieli"}, -- Tornedalen Finnish
["fkv"] = {"Kven"}, -- Kven Finnish
["frk"] = {"Old Frankish"}, -- Frankish
["gez"] = {"Ge'ez"}, -- Geez
["gju"] = {"Gujari"}, -- Gujari
["gsw"] = {"Alemannic German"}, -- Swiss German
["gul"] = {"Gullah"}, -- Sea Island Creole English
["hak"] = {"Hakka"}, -- Hakka Chinese
["hbo"] = {"Biblical Hebrew"}, -- Ancient Hebrew
["hnd"] = {"Hindko"}, -- Southern Hindko
-- ["ikt"] = {"Inuvialuk"}, -- Inuinnaqtun
["kaa"] = {"Karakalpak"}, -- Kara-Kalpak
["khb"] = {"Tai Lü"}, -- Lü
["kmr"] = {"Kurmanji Kurdish"}, -- Northern Kurdish
["kpo"] = {"Kposo"}, -- Ikposo
["krj"] = {"Kinaray-a"}, -- Kinaray-A
["ktz"] = {"Juǀ'hoan"}, -- Juǀʼhoan
["lez"] = {"Lezgian"}, -- Lezghian
["liv"] = {"Livonian"}, -- Liv
["lng"] = {"Lombardic"}, -- Langobardic
["mia"] = {"Miami-Illinois"}, -- Miami
["miq"] = {"Miskito"}, -- Mískito
["mix"] = {"Mixtec"}, -- Mixtepec Mixtec
["mni"] = {"Meitei"}, -- Manipuri
["mrj"] = {"Hill Mari"}, -- Western Mari
["mww"] = {"White Hmong"}, -- Hmong Daw
["new"] = {"Nepal Bhasa"}, -- Newari
["nso"] = {"Northern Sotho"}, -- Pedi
["nwc"] = {"Classical Nepal Bhasa"}, -- Classical Newari
["ood"] = {"O'odham"}, -- Tohono O'odham
["otk"] = {"Old Turkic"}, -- Old Turkish
["pal"] = {"Middle Persian"}, -- Pahlavi
["pam"] = {"Kapampangan"}, -- Pampanga
["phr"] = {"Potwari"}, -- Pahari-Potwari
["pka"] = {"Jain Prakrit"}, -- Ardhamāgadhī Prākrit
-- ["pnb"] = {"Punjabi"}, -- Western Panjabi; overridden to Punjabi (Western)
["psu"] = {"Shauraseni"}, -- Sauraseni Prākrit
["rap"] = {"Rapa Nui"}, -- Rapanui
["rar"] = {"Cook Islands Māori"}, -- Rarotongan
["rmu"] = {"Scandoromani"}, -- Tavringer Romani
["rom"] = {"Romani"}, -- Romany
["rup"] = {"Aromanian"}, -- Macedo-Romanian
["ryu"] = {"Okinawan"}, -- Central Okinawan
["sdc"] = {"Sassarese"}, -- Sassarese Sardinian
["sdn"] = {"Gallurese"}, -- Gallurese Sardinian
["shp"] = {"Shipibo"}, -- Shipibo-Conibo
["src"] = {"Logudorese"}, -- Logudorese Sardinian
["sro"] = {"Campidanese"}, -- Campidanese Sardinian
["tkl"] = {"Tokelauan"}, -- Tokelau
["tvl"] = {"Tuvaluan"}, -- Tuvalu
["tyv"] = {"Tuvan"}, -- Tuvinian
["vls"] = {"West Flemish"}, -- Vlaams
["wep"] = {"Westphalian"}, -- Westphalien
["xal"] = {"Oirat"}, -- Kalmyk
["xcl"] = {"Old Armenian"}, -- Classical Armenian
["yua"] = {"Yucatec Maya"}, -- Yucateco
--<end do-not-edit except to comment out>--
}
--[[--------------------------< O V E R R I D E _ 5 >----------------------------------------------------------
Language codes and names in this table override the ISO 639 names in: Module:Language/data/ISO 639-5
]]
local override_5 = {
}
--[[--------------------------< O V E R R I D E _ D E P >------------------------------------------------------
Language codes and names in this table override the ISO 639 names in: Module:Language/data/ISO 639 deprecated
Used by ISO 639 name only
]]
local override_dep = {
}
--[[--------------------------< 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 = {
["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)
["xlg"] = {"Ligurian (ancient language)"}, -- see Template_talk:Lang#Ligurian_dab
}
--[[--------------------------< O V E R R I D E >--------------------------------------------------------------
this is the override table used by Module:Lang. The table is initialized with tag/name pairs not used by
Module:ISO 639 name
]]
local override = {
--<private-use tags>--
["cel-x-proto"] = {"Proto-Celtic"}, -- cel in IANA is Celtic languages
["gem-x-proto"] = {"Proto-Germanic"}, -- gem in IANA is Germanic languages
["grc-x-aeolic"] = {"Aeolic Greek"}, -- these grc-x-... codes are preferred alternates to the non-standard catchall code grc-gre
["grc-x-attic"] = {"Attic Greek"},
["grc-x-biblical"] = {"Biblical Greek"},
["grc-x-byzant"] = {"Byzantine Greek"},
["grc-x-classic"] = {"Classical Greek"},
["grc-x-doric"] = {"Doric Greek"},
["grc-x-hellen"] = {"Hellenistic Greek"},
["grc-x-ionic"] = {"Ionic Greek"},
["grc-x-koine"] = {"Koinē Greek"},
["grc-x-medieval"] = {"Medieval Greek"},
["grc-x-patris"] = {"Patristic Greek"},
["grk-x-proto"] = {"Proto-Greek"}, -- grk in IANA is Greek languages
["iir-x-proto"] = {"Proto-Indo-Iranian"}, -- iir in IANA is Indo-Iranian Languages
["ira-x-proto"] = {"Proto-Iranian"}, -- ira in IANA is Iranian languages
["itc-x-proto"] = {"Proto-Italic"}, -- itc in IANA is Italic languages
["ksh-x-colog"] = {"Colognian"}, -- en.wiki article is Colognian; ksh (Kölsch) redirects there
["mis-x-ripuar"] = {"Ripuarian"}, -- replaces improper use of ksh in wp_languages
["sla-x-proto"] = {"Proto-Slavic"}, -- sla in IANA is Slavic languages
["yuf-x-hav"] = {"Havasupai"}, -- IANA name for yuf is Havasupai-Walapai-Yavapai
["yuf-x-wal"] = {"Walapai"},
["yuf-x-yav"] = {"Yavapai"},
--<end private-use tags>--
--<ietf tags>--
["ca-valencia"] = {"Valencian"},
["de-at"] = {"Austrian German"}, -- these code-region and code-variant tags to match en.wiki article names
["de-ch"] = {"Swiss Standard German"},
["en-au"] = {"Australian English"},
["en-ca"] = {"Canadian English"},
["en-emodeng"] = {"Early Modern English"},
["en-gb"] = {"British English"},
["en-ie"] = {"Irish English"},
["en-in"] = {"Indian English"},
["en-nz"] = {"New Zealand English"},
["en-us"] = {"American English"},
["en-za"] = {"South African English"},
["tw-asante"] = {"Asante Twi"},
["nan-tw"] = {"Taiwanese Hokkien"}, -- make room for IANA / 639-3 nan Min Nan Chinese; match en.wiki article title
["nds-nl"] = {"Dutch Low Saxon"}, -- Low German
["oc-provenc"] = {"Provençal"},
["xal-ru"] = {"Kalmyk"}, -- to match en.wiki article title
--<end ietf tags>--
-- these ietf language-tag overrides imported from Module:Language/data/wp_languages
--<begin do-not-edit except to comment out>--
-- ["en-SA"] = {"South African English"}, -- English; no; SA is not South Africa it Saudi Arabia; ZA is South Africa
--<end do-not-edit except to comment out>--
}
--[[--------------------------< O V E R R I D E _ M A K E >----------------------------------------------------
Combines some of the above override tables into one table used by Module:Lang. IANA does not include ISO 639-2B
and supports a limited set of deprecated code/name pairs so these are excluded from override{}
]]
local function override_make()
local tables = {
override_1,
override_2,
override_3,
override_5,
}
local synonyms = mw.loadData ('Module:Lang/ISO 639 synonyms'); -- _override_2 and override_3 contain codes that IANA promotes to ISO 639-1; these will be excluded
for _, tbl in ipairs (tables) do
for code, names in pairs (tbl) do
if not synonyms[code] then
override[code] = names;
end
end
end
return override;
end
--[[--------------------------< E X P O R T E D T A B L E S >------------------------------------------------
]]
return
{
override_1 = override_1, -- these used by Module:ISO 639 name
override_2 = override_2,
override_2B = override_2B,
override_3 = override_3,
override_5 = override_5,
override_dep = override_dep,
override = override_make(), -- this used by Module:Lang
article_name = article_name, -- this used by Module:Lang and by Module:ISO 639 name
}