Jump to content

Module:Lang/data

Ass Wikipedia.

Documentation for this module may be created at Module:Lang/data/doc

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 >------------------------------------------------------------

	["ab"] = "Abcaashish",                                                          -- to match en.wiki article name
	["ca-valencia"] = "Valensish",
	["cu"] = "Slavonish Agglish",													-- 2nd IANA name;
	["de-at"] = "Germaanish Austeyragh",												-- these code-region and code-variant tags to match en.wiki article names
	["de-ch"] = "Germaanish Stundayrtit Elveeishagh",
	["en-au"] = "Baarle Austrailagh",
	["en-ca"] = "Baarle Chanadagh",
	["en-emodeng"] = "Baarle Noa-emshyragh Leah",
	["en-gb"] = "Baarle Ghoaldagh",
	["en-ie"] = "Baarle Yernagh",
	["en-in"] = "Baarle Injinagh",
	["en-nz"] = "Baarle Noa-Heelynnagh",
	["en-us"] = "Baarle Americaanagh",
	["en-za"] = "Baarle Affrickagh Yiass",
	["fy"] = "Freeshlannish Heear",													-- Western Frisian
	["mo"] = "Moldovish",														-- Moldavian (deprecated code); to match en.wiki article title
	["nl-be"] = "Flandrynish",														-- match MediaWiki
	["oc-provenc"] = "Provençal",
	["ps"] = "Pashtish",															-- Pushto
	["pt-br"] = "Portiugish Vrasseelagh",											-- match MediaWiki
	["tw-asante"] = "Asante Twi",
	["ug"] = "Uyghurish",															-- 2nd IANA name; to match en.wiki article name

-- these ISO 639-1 language-name overrides imported from Module:Language/data/wp_languages
--<begin do-not-edit except to comment out>--
		["av"] = "Avarish",														-- Avaric
		["bo"] = "Tibetish Stundayrtit",											-- Tibetan
		["el"] = "Greagish",														-- Modern Greek
--		["en-SA"] = "Baarle Affrickagh Yiass",									-- English; no; SA is not South Africa it Saudi Arabia; ZA is South Africa
		["ff"] = "Fula",														-- Fulah
		["ht"] = "Creeole Haiti",												-- Haitian
		["hz"] = "Otjiherero",													-- Herero
		["ii"] = "Yi",															-- Sichuan Yi
		["ki"] = "Gikuyu",														-- Kikuyu
		["kl"] = "Greenlandic",													-- Kalaallisut
		["ky"] = "Kyrgish",														-- Kirghiz
		["lg"] = "Luganda",														-- Ganda
		["li"] = "Limburgish",													-- Limburgan
		["mi"] = "Māori",														-- Maori
		["na"] = "Nauru",														-- Nauru
		["nb"] = "Bokmål",														-- Norwegian Bokmål
		["nd"] = "Ndebele Hwoaie",											-- North Ndebele
		["nn"] = "Nynorsk",														-- Norwegian Nynorsk
		["nr"] = "Ndebele Yiass",											-- South Ndebele
		["ny"] = "Chichewa",													-- Nyanja
		["oj"] = "Ojibwe",														-- Ojibwa
		["or"] = "Odia",														-- Oriya
		["pa"] = "Punjabish",														-- Panjabi
		["rn"] = "Kirundi",														-- Rundi
		["sl"] = "Sloveanish",														-- Slovenian
		["ss"] = "Swassish",														-- Swati
		["st"] = "Sotho",														-- Southern Sotho
		["to"] = "Tongan",														-- Tonga
--<end do-not-edit except to comment out>--


------------------------------< I S O _ 6 3 9 - 2,   - 3,   - 5 >----------------------------------------------

	["alv"] = "çhengaghyn Atlantagh–Congo",										-- to match en.wiki article title (endash)
	["arc"] = "Aramaaish Impiroil (700-300 RC)",									-- Official Aramaic (700-300 BCE), Imperial Aramaic (700-300 BCE); to match en.wiki article title uses ISO639-2 'preferred' name
	["art"] = "troggit",													-- to match en.wiki article; lowercase for category name
	["bhd"] = "Bhadarwahi",														-- Bhadrawahi; to match en.wiki article title
	["bla"] = "Blackfoot",														-- Siksika; to match en.wiki article title
	["bua"] = "Buryatish",															-- Buriat; this is a macro language; these four use wp preferred transliteration;
	["bxm"] = "Buryatish Vongoilagh",												-- Mongolia Buriat; these three all redirect to Buryat
	["bxr"] = "Buryatish Rooshagh",													-- Russia Buriat;
	["bxu"] = "Buryatish Heenagh",													-- China Buriat;
	["byr"] = "Yipma",															-- Baruya, Yipma
	["egy"] = "Shenn Egyptish",												-- Egyptian (Ancient); distinguish from contemporary arz: Egyptian Arabic 
	["ems"] = "Alutiiq",														-- Pacific Gulf Yupik; to match en.wiki article title
	["esx"] = "çhengaghtyn Eskimagh–Aleutagh",											-- to match en.wiki article title (endash)
	["frr"] = "Freeshlannish Hwoaie",													-- Northern Frisian
	["frs"] = "Saxonish Injil Reeshlannagh Hiar",											-- Eastern Frisian
	["gsw-fr"] = "Alsaasish",													-- match MediaWiki
	["haa"] = "Hän",															-- Han; to match en.wiki article title
	["hmx"] = "çhengaghyn Hmong–Mien",											-- to match en.wiki article title (endash)
	["ilo"] = "Ilocano",														-- Iloko; to match en.wiki article title
	["jam"] = "Patois Jamaicagh",												-- Jamaican Creole English
	["lij-mc"] = "Monacish",													-- Ligurian as spoken in Monaco
	["luo"] = "Dholuo",															-- IANA (primary) /ISO 639-3: Luo (Kenya and Tanzania); IANA (secondary): Dholuo
	["mhr"] = "Marish Lheannee",													-- Eastern Mari
	["mid"] = "Mandaish Noa-emshyragh",													-- Mandaic
	['mis'] = "gyn coad",														-- Uncoded languages; capitalization; special scope, not collective scope;
	["mkh"] = "çhengaghyn Mon–Khmer",											-- to match en.wiki article title (endash)
	["mla"] = "Tamambo",														-- Malo
	['mte'] = "Mono-Alu",														-- Mono (Solomon Islands)
	['mul'] = "ymmodee",														-- Multiple languages; capitalization; special scope, not collective scope;
	["nan-tw"] = "Hokkien Taiwaanagh",											-- make room for IANA / 639-3 nan Min Nan Chinese; match en.wiki article title
	["new"] = "Newar",															-- Newari, Nepal Bhasa; to match en,wiki article title
	["ngf"] = "çhengaghyn Tessen-Noa-Ghuineagh",										-- to match en.wiki article title (endash)
	["nic"] = "çhengaghyn Neegeyr–Congo",											-- Niger-Kordofanian languages; to match en,wiki article title
	["nrf"] = "Normanish",															-- not quite a collective - IANA name: Jèrriais + Guernésiais; categorizes to Norman-language text
	["nrf-gg"] = "Guernésiais",													-- match MediaWiki
	["nrf-je"] = "Jèrriais",													-- match MediaWiki
	["nzi"] = "Nzema",															-- Nzima; to match en.wiki article title
	["oma"] = "Omaha–Ponca",													-- to match en.wiki article title (endash)
	["orv"] = "Shenn Slavish Hiar",												-- Old Russian
	["pfl"] = "Germaanish Phalateenagh",												-- Pfaelzisch; to match en.wiki article
	["pie"] = "Piro Pueblo",													-- Piro; to match en.wiki article
	["pms"] = "Piedmontish",													-- Piemontese; to match en.wiki article title
	["pnb"] = "Punjabish (Heear)",												-- Western Panjabi; dab added to override import from ~/wp languages and distinguish pnb from pa in reverse look up tag_from_name()
	["rop"] = "Creeole Austrailagh",												-- Kriol; en.wiki article is a dab; point to correct en.wiki article
	["sdo"] = "Bukar–Sadong",													-- Bukar-Sadung Bidayuh; to match en.wiki article title
	["stq"] = "Freeshlannish Saterland",												-- Saterfriesisch
	["und"] = "neuoolit",													-- capitalization to match existing category
	["wrg"] = "Warrongo",														-- Warungu
	["xal-ru"] = "Kalmykish",														-- to match en.wiki article title
	["xgf"] = "Tongva",															-- ISO 639-3 is Gabrielino-Fernandeño
	["yuf"] = "Havasupai–Hualapai",												-- Havasupai-Walapai-Yavapai; to match en.wiki article title
	["zxx"] = "gyn stoo çhengoaylleeagh",											-- capitalization

-- these ISO 639-2, -3 language-name overrides imported from Module:Language/data/wp_languages
--<begin do-not-edit except to comment out>--
		["ace"] = "Acehnish",													-- Achinese
		["aec"] = "Arabish Sa'idi",												-- Saidi Arabic
		["akl"] = "Aklan",														-- Aklanon
		["alt"] = "Altayish",														-- Southern Altai
		["apm"] = "Mescalero-Chiricahua",										-- Mescalero-Chiricahua Apache
		["bal"] = "Baloçhish",													-- Baluchi
--		["bcl"] = "Bicolanish Veanagh",											-- Central Bikol
		["bin"] = "Edo",														-- Bini
		["bpy"] = "Manipurish Bishnupriya",										-- Bishnupriya
		["chg"] = "Chagatay",													-- Chagatai
		["ckb"] = "Kurdish Sorani",												-- Central Kurdish
		["cnu"] = "Shenwa",														-- Chenoua
		["coc"] = "Cocopah",													-- Cocopa
		["diq"] = "Zazakish",														-- Dimli
		["fit"] = "Meänkieli",													-- Tornedalen Finnish
		["fkv"] = "Kven",														-- Kven Finnish
		["frk"] = "Shenn Rankish",												-- Frankish
		["gez"] = "Ge'ez",														-- Geez
		["gju"] = "Gujarish",														-- Gujari
		["gsw"] = "Germaanish Alemannagh",											-- Swiss German
		["gul"] = "Gullah",														-- Sea Island Creole English
		["hak"] = "Hakka",														-- Hakka Chinese
		["hbo"] = "Ewnish Vibleagh",											-- Ancient Hebrew
		["hnd"] = "Hindko",														-- Southern Hindko
--		["ikt"] = "Inuvialuk",													-- Inuinnaqtun
		["kaa"] = "Karakalpakish",													-- Kara-Kalpak
		["khb"] = "Tai Lü",														-- Lü
		["kmr"] = "Kurdish Kurmanji",											-- Northern Kurdish
		["kpo"] = "Kposo",														-- Ikposo
		["krj"] = "Kinaray-a",													-- Kinaray-A
		["ktz"] = "Juǀ'hoan",													-- Juǀʼhoan
		["lez"] = "Lesgish",													-- Lezghian
		["liv"] = "Livonish",													-- Liv
		["lng"] = "Lombardish",													-- Langobardic
		["mia"] = "Miami-Illinois",												-- Miami
		["miq"] = "Miskito",													-- Mískito
		["mix"] = "Mixtec",														-- Mixtepec Mixtec
		["mni"] = "Meitei",														-- Manipuri
		["mrj"] = "Marish Chrink",													-- Western Mari
		["mww"] = "Hmong Bane",												-- Hmong Daw
		["nds-nl"] = "Saxonish Injil Ollanagh",											-- Low German
--		["new"] = "Nepal Bhasa",												-- Newari
		["nso"] = "Sotho Hwoaie",												-- Pedi
--		["nwc"] = "Nepal Bhasa Classicagh",										-- Classical Newari, Classical Nepal Bhasa, Old Newari
		["ood"] = "O'odham",													-- Tohono O'odham
		["otk"] = "Shenn Turkic",													-- Old Turkish
		["pal"] = "Pershish Veanagh",												-- Pahlavi
		["pam"] = "Kapampanganish",												-- Pampanga
		["phr"] = "Potwari",													-- Pahari-Potwari
		["pka"] = "Jain Prakrit",												-- Ardhamāgadhī Prākrit
--		["pnb"] = "Punjabish",													-- Western Panjabi
		["psu"] = "Shauraseni",													-- Sauraseni Prākrit
		["rap"] = "Rapa Nui",													-- Rapanui
		["rar"] = "Māori Ellanyn Cook",											-- Rarotongan
		["rmu"] = "Scandoromanish",												-- Tavringer Romani
		["rom"] = "Romanish",														-- Romany
		["rup"] = "Aromaanish",													-- Macedo-Romanian
		["ryu"] = "Okinawish",													-- Central Okinawan
		["sdc"] = "Sassarish",													-- Sassarese Sardinian
		["sdn"] = "Gallurish",													-- Gallurese Sardinian
		["shp"] = "Shipibo",													-- Shipibo-Conibo
		["src"] = "Logudorish",													-- Logudorese Sardinian
		["sro"] = "Campidanish",												-- Campidanese Sardinian
		["tkl"] = "Tokelauish",													-- Tokelau
		["tvl"] = "Tuvaluish",													-- Tuvalu
		["tyv"] = "Tuvish",														-- Tuvinian
		["vls"] = "Flandrynish Heear",												-- Vlaams
		["wep"] = "Westphalish",												-- Westphalien
		["xal"] = "Oirat",														-- Kalmyk
		["xcl"] = "Shenn Armeanish",												-- Classical Armenian
		["yua"] = "Mayish Yucatec",												-- Yucateco
--<end do-not-edit except to comment out>--


------------------------------< P R I V A T E _ U S E _ T A G S >----------------------------------------------

	["akk-x-latbabyl"] = "Babylonish Yeianagh",
	["akk-x-midassyr"] = "Akkadish Assyriagh Veanagh",
	["akk-x-midbabyl"] = "Akkadish Vabylonagh Veanagh",
	["akk-x-neoassyr"] = "Akkadish Noa-Assyriagh",
	["akk-x-neobabyl"] = "Akkadish Noa-Vabylonagh",
	["akk-x-old"] = "Shenn Akkadish",
	["akk-x-oldassyr"] = "Akkadish Henn-Assyriagh",
	["akk-x-oldbabyl"] = "Akkadish Henn-Vabylonagh",
	["alg-x-proto"] = "Proto-Algonquiagh",										-- alg in IANA is Algonquian languages
	["ca-x-old"] = "Shenn Chataloanish",
	["cel-x-combrit"] = "Brythonagh Cadjin",										-- cel in IANA is Celtic languages
	["cel-x-proto"] = "Proto-Cheltish",
	["egy-x-demotic"] = "Egyptish Ghemotagh",
	["egy-x-late"] = "Egyptish Yeianagh",
	["egy-x-middle"] = "Egyptish Veanagh",
	["egy-x-old"] = "Shenn Egyptish",
	["gem-x-proto"] = "Proto-Ghermaanic",											-- gem in IANA is Germanic languages
	["gmw-x-ecg"] = "Germaanish Veanagh Hiar",
	["grc-x-aeolic"] = "Greagish Aeoleeanagh",											-- these grc-x-... codes are preferred alternates to the non-standard catchall code grc-gre
	["grc-x-attic"] = "Greagish Attagh",
	["grc-x-biblical"] = "Greagish Vibleagh",
	["grc-x-byzant"] = "Greagish Vaisantagh",
	["grc-x-classic"] = "Greagish Chlassicagh",
	["grc-x-doric"] = "Greagish Ghoragh",
	["grc-x-hellen"] = "Greagish Hellenagh",
	["grc-x-ionic"] = "Greagish Eeaanagh",
	["grc-x-koine"] = "Greagish Koinē",
	["grc-x-medieval"] = "Greagish Vean-eashagh",
	["grc-x-patris"] = "Greagish Phatristagh",
	["grk-x-proto"] = "Proto-Ghreagish",											-- grk in IANA is Greek languages
	["iir-x-proto"] = "Proto-Ind-Eeraanagh",										-- iir in IANA is Indo-Iranian Languages
	["inc-x-mitanni"] = "Mitanni-Ayreeanagh",										-- inc in IANA is Indic languages
	["inc-x-proto"] = "Proto-Ind-Ayreeanagh",
	["ine-x-proto"] = "Proto-Ind-Oarpagh",
	["ira-x-proto"] = "Proto-Eeraanagh",											-- ira in IANA is Iranian languages
	["itc-x-proto"] = "Proto-Iddaalagh",											-- itc in IANA is Italic languages
	["ksh-x-colog"] = "Koloinish",												-- en.wiki article is Colognian; ksh (Kölsch) redirects there
	["la-x-medieval"] = "Ladjyn Vean-eashagh",
	["la-x-new"] = "Noa-Ladjyn",
	["lmo-x-milanese"] = "Milaanish",											-- lmo in IANA is Lombard; Milanese is a dialect
	["mis-x-ripuar"] = "Ripuarish",												-- replaces improper use of ksh in wp_languages
	["prg-x-old"] = "Shenn Phrooshish",
	["sem-x-ammonite"] = "Ammonish",
	["sem-x-aramaic"] = "Aramaaish",
	["sem-x-canaan"] = "çhengaghyn Canaanagh",
	["sem-x-dumaitic"] = "Dumaitish",
	["sem-x-egurage"] = "Gurage Hiar",
	["sem-x-hatran"] = "Aramaaish Hatran",
	["sem-x-oldsoara"] = "Shenn Arabish Yiass",
	["sem-x-palmyren"] = "Aramaaish Phalmyragh",
	["sem-x-proto"] = "Proto-Hemmish",
	["sem-x-taymanit"] = "Taymanitish",
	["sla-x-proto"] = "Proto-Slavish",											-- 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",
	["xsc-x-pontic"] = "Skythish Phontagh",										-- xsc in IANA is Scythian
	["xsc-x-saka"] = "Saka",
	["xsc-x-sarmat"] = "Sarmatish",
	}


--[[--------------------------< 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'] = "Kumanish (Noa-Ghuinea)",									-- Kuman (Papua New Guinea); to avoid Kuman dab page
	["lij"] = "Ligurish (çhengey Romansagh)",									-- Ligurian; see Template_talk:Lang#Ligurian_dab
	['mbo'] = "çhengey Mbo (Cameroon)",										-- Mbo (Cameroon)
	['mnh'] = "çhengey Mono (y Congo)",											-- Mono (Democratic Republic of Congo); see Template_talk:Lang#Mono_languages
	['mnr'] = "çhengey Mono (California)",										-- Mono (USA)
	['mru'] = "çhengey Mono (Cameroon)",										-- Mono (Cameroon)
	['qwm'] = "Kumanish (y Roosh)",													-- Kuman (Russia); to avoid Kuman dab page
	["snq"] = "çhengey Sangu (Gabon)",											-- Sangu (Gabon)
	["toi"] = "çhengey Tonga (y Tambia as y Çhimbabwe)",                           -- Tonga (Zambia and Zimbabwe); to avoid Tonga language dab page
	["xlg"] = "Ligurish (shenn çhengey)",									-- see Template_talk:Lang#Ligurian_dab
	["zmw"] = "çhengey Mbo (y Congo)",											-- Mbo (Democratic Republic of Congo)
	}


--[=[-------------------------< 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'] = 'tessen-lettyraghey Academee yn Ewnish',
		},

	['ala'] = {
		['default'] = 'tessen-lettyraghey Heshaght Lioarlann America – Lioarlann y Chohionnal',
		},

	['ala-lc'] = {
		['default'] = 'tessen-lettyraghey Heshaght Lioarlann America – Lioarlann y Chohionnal',
		},

	['batr'] = {
		['default'] = 'Reillyn Tessen-lettyraghey Arabish Bikdash',
		},

	['bgn/pcgn'] = {
		['default'] = 'tessen-lettyraghey Voayrd cour Enmyn Çheer-oaylleeagh / Bing Veayn cour Enmyn Çheeroaylleeagh',
		},

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

		['default'] = 'tessen-lettyraghey DIN',
		},

	['eae'] = {
		['default'] = 'tessen-lettyraghey Encyclopaedia Aethiopica',
		},

	['hepburn'] = {
		['default'] = 'tessen-lettyraghey Hepburn',
		},

	['hunterian'] = {
		['default'] = 'tessen-lettyraghey Hunter',
		},

	['iast'] = {
		['default'] = 'tessen-lettyraghey Abbyrlhit Eddyr-ashoonagh y Tanskrit',
		},

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

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

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

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

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

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

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

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

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

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

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

		['default'] = 'tessen-lettyraghey ISO',
		},

	['jyutping'] = {
		['default'] = 'tessen-lettyraghey Jyutping',
		},

	['mlcts'] = {
		['default'] = 'Corys Tessen-lettyraghey Chommishoon Çhengaghyn Myanmar',
		},

	['mr'] = {
		['default'] = 'tessen-lettyraghey McCune–Reischauer',
		},

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

	['no_std'] = {																-- when no transliteration standard is supplied
		['akk'] = 'tessen-lettyraghey Shemmagh',
		['sem'] = 'tessen-lettyraghey Shemmagh',
		['phnx'] = 'tessen-lettyraghey Shemmagh',
		['xsux'] = 'tessen-lettyraghey Jeenysagh',
		},

	['pinyin'] = {
		['default'] = 'tessen-lettyraghey Pinyin',
		},

	['rr'] = {
		['default'] = 'tessen-lettyraghey Romanagh Lhiasit y Choreeish',
		},

	['rtgs'] = {
		['default'] = 'Ard-chorys Reeoil Thai yn Tessen-lettyraghey',
		},
	
	['satts'] = {
		['default'] = 'tessen-lettyraghey Chorys Tessen-lettyraghey Çhaghnoil yn Arabish Stundayrtit',
		},

	['scientific'] = {
		['default'] = 'tessen-lettyraghey sheansagh',
		},

	['ukrainian'] = {
		['default'] = 'corys romanagh ashoonagh yn Ookraan',
		},

	['ungegn'] = {
		['default'] = 'tessen-lettyraghey Phossan Oayllee ny h-Ashoonyn Unnaneysit cour Enmyn Çheer-oaylleeagh',
		},

	['wadegile'] = {
		['default'] = 'tessen-lettyraghey Wade–Giles',
		},

	['wehr'] = {
		['default'] = 'tessen-lettyraghey Hans Wehr',
		},
	};


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,
	};