Module:Lang/langx
Appearance
This Lua module is used on approximately 590,000 pages, or roughly 1% of all pages. To avoid major disruption and server load, any changes should be tested in the module's /sandbox or /testcases subpages, or in your own module sandbox. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
--[[--------------------------< R T L _ T >--------------------------------------------------------------------
table of language tags that render text right-to-left
Data in this table scraped from {{lang-xx}} templates that set |rtl=yes
keys (tags) in this table must be lowercase.
TODO: in the long run, do we need this table? Can't {{langx}} apply dir="rtl" attribute automatically?
]]
local rtl_t = {
----------< I S O 6 3 9 - 1 >----------
['ae'] = true,
['ar'] = true,
['fa'] = true,
['he'] = true,
['ku'] = true,
['ps'] = true,
['sd'] = true,
['ur'] = true,
['yi'] = true,
----------< I S O 6 3 9 - 2 , - 3 >----------
['acm'] = true,
['aeb'] = true,
['aec'] = true,
['afb'] = true,
['aii'] = true,
['aij'] = true,
['aiq'] = true,
['ajp'] = true,
['amw'] = true,
['apc'] = true,
['arb'] = true,
['arc'] = true,
['arq'] = true,
['ary'] = true,
['arz'] = true,
['ayn'] = true,
['bal'] = true,
['bdz'] = true,
['bej'] = true,
['bgn'] = true,
['bqi'] = true,
['brh'] = true,
['bsk'] = true,
['ckb'] = true,
['cld'] = true,
['deh'] = true,
['gay'] = true,
['gbz'] = true,
['glk'] = true,
['hac'] = true,
['haz'] = true,
['hbo'] = true,
['hnd'] = true,
['hno'] = true,
['jog'] = true,
['jrb'] = true,
['jye'] = true,
['khw'] = true,
['kls'] = true,
['kvx'] = true,
['lrc'] = true,
['lss'] = true,
['luz'] = true,
['mey'] = true,
['mid'] = true,
['mki'] = true,
['mnj'] = true,
['mwr'] = true,
['myz'] = true,
['mzb'] = true,
['mzn'] = true,
['nlm'] = true,
['nqo'] = true,
['oru'] = true,
['ota'] = true,
['otk'] = true,
['pal'] = true,
['pes'] = true,
['prs'] = true,
['prx'] = true,
['rif'] = true,
['rys'] = true,
['sbn'] = true,
['scl'] = true,
['sgh'] = true,
['siz'] = true,
['skr'] = true,
['sqo'] = true,
['sqr'] = true,
['srh'] = true,
['syc'] = true,
['syr'] = true,
['tru'] = true,
['ttt'] = true,
['wbl'] = true,
['wne'] = true,
['xaa'] = true,
['xdm'] = true,
['xhe'] = true,
['xqa'] = true,
['ydg'] = true,
}
--[[--------------------------< S C R I P T _ T >--------------------------------------------------------------
table of language tags that use script subtags
Data in this table scraped from {{lang-xx}} templates that set |script=<script tag>
keys (tags) in this table must be lowercase.
]]
local script_t = {
----------< I S O 6 3 9 - 1 >----------
['ce'] = 'Cyrl',
['ff'] = 'Latn',
['sh'] = 'Latn',
----------< I S O 6 3 9 - 2 , - 3 >----------
['bft'] = 'Aran',
['brx'] = 'Deva',
['bsk'] = 'Aran',
['chr'] = 'Cher',
['dgo'] = 'Deva',
['dng'] = 'Cyrl',
['dyu'] = 'Latn',
['ess'] = 'Latn',
['evn'] = 'Cyrl',
['sat'] = 'Olck',
['shn'] = 'Mymr',
}
--[[--------------------------< S I Z E _ T >------------------------------------------------------------------
table of language tags that use |size=
Data in this table scraped from {{lang-xx}} templates that set |size=<size>
keys (tags) in this table must be lowercase.
]]
local size_t = {
['bft'] = '125%',
}
--[[--------------------------< L I N K _ T >------------------------------------------------------------------
table of language tags that use |link=
Data in this table scraped from {{lang-xx}} templates that set |link=
keys (tags) in this table must be lowercase.
]]
local link_t = {
['en'] = 'no',
}
--[[--------------------------< U N S U P P O R T E D _ T >----------------------------------------------------
these are language tags from {{lang-??}} templates that should not be converted to {{langx}} during the transition
from {{lang-??}} to {{langx|??}}.
this table used to add a category when {{langx}} templates are encountered with these language tags.
contents of this table copied from Wikipedia:Templates_for_discussion/Log/2024_September_27/lang-%3F%3F_templates#excluded_templates
]]
local unsupported_t = {
-- ['ast-leo'] = true, -- deleted; use ast-es
['bcs-latn-cyrl'] = true,
['bcs'] = true,
['cnr-cyrl'] = true,
['cnr-cyrl-latn'] = true,
['cnr-latn'] = true,
['cnr-latn-cyrl'] = true,
['crh3'] = true,
['est-sea'] = true,
['fra-frc'] = true,
['grc-gre'] = true,
['hmd'] = true,
['ka'] = true,
['ku-arab'] = true,
-- ['lmo-cr'] = true, -- deleted; use lmo-x-cremish
-- ['lmo-it'] = true, -- deleted; use lmo-x-berg
['mnc'] = true,
['my-mymr'] = true,
['my-name-mlcts'] = true,
['pun'] = true,
['rus'] = true,
-- ['sa2'] = true, -- deleted; use {{lang}}
['sh-cyrl-latn'] = true,
['sh-cyrl'] = true,
['sh-latn-cyrl'] = true,
['sh-latn'] = true,
['sq-definite'] = true,
-- ['sr'] = true, -- per Template_talk:Lang#tracking_sr_usage_with_issues; discussion died nothing being done
['sr-cyrl-latn'] = true,
['sr-cyrl'] = true,
['sr-latn-cyrl'] = true,
['sr-latn'] = true,
['su-fonts'] = true,
['uniturk'] = true,
['uz-cyrl-latn'] = true,
['uz-latn-cyrl'] = true,
['uz-latn'] = true,
-- ['vi-chunom'] = true, -- redirected to {{Chunom}}
-- ['vi-hantu'] = true, -- redirected to {{Chuhan}}
-- ['zh'] = true, -- with unknown parameter detection ok to use {{langx|zh|...}}
['1ca'] = true,
-- Moldovan Cyrillic
}
--[[--------------------------< E X P O R T S >----------------------------------------------------------------
]]
return {
link_t = link_t,
rtl_t = rtl_t,
script_t = script_t,
size_t = size_t,
unsupported_t = unsupported_t,
}