Module:ISO 639: Difference between revisions
Appearance
Content deleted Content added
add he = "Hebrew", mnc = "Manchu", sr = "Serbian", te = "Telugu", th = "Thai", wuu = "Wu", yue = "Yue" |
add ps, pus, xno |
||
| Line 28: | Line 28: | ||
grc = "Ancient Greek", |
grc = "Ancient Greek", |
||
la = "Latin", |
la = "Latin", |
||
| ⚫ | |||
cs = "Czech", |
cs = "Czech", |
||
cy = "Welsh", |
cy = "Welsh", |
||
| Line 42: | Line 41: | ||
he = "Hebrew", |
he = "Hebrew", |
||
mnc = "Manchu", |
mnc = "Manchu", |
||
| ⚫ | |||
ps = "Pashto", |
|||
pus = "Pashto", |
|||
sr = "Serbian", |
sr = "Serbian", |
||
te = "Telugu", |
te = "Telugu", |
||
| Line 47: | Line 49: | ||
wuu = "Wu", |
wuu = "Wu", |
||
yue = "Yue", |
yue = "Yue", |
||
xno = "Anglo-Norman", |
|||
} |
} |
||
return langs[code] |
return langs[code] |
||
Revision as of 12:38, 23 April 2022
Documentation for this module may be created at Module:ISO 639/doc
--[=[
Module description
]=]
local p = {} --p stands for package
--[=[
Get the language name, in English, for a given ISO 639 (-1, -2 or -3) code
Not all languages are in here, that's laziness rather than design
Returns nil if the language is not in the lookup table.
]=]
function p.language_name(code)
local langs = {
en = "English",
enm = "Middle English",
ang = "Old English",
ja = "Japanese",
de = "German",
fr = "French",
es = "Spanish",
zh = "Chinese",
['zh-hant'] = "Chinese", -- should be different?
['zh-hans'] = "Chinese",
it = "Italian",
nl = "Dutch",
el = "Greek",
grc = "Ancient Greek",
la = "Latin",
cs = "Czech",
cy = "Welsh",
sco = "Scots",
ta = "Tamil",
ain = "Ainu",
fa = "Persian",
ar = "Arabic",
sv = "Swedish",
kos = "Kosraean",
nb = "Norwegian Bokmål",
sa = "Sanskrit",
he = "Hebrew",
mnc = "Manchu",
pl = "Polish",
ps = "Pashto",
pus = "Pashto",
sr = "Serbian",
te = "Telugu",
th = "Thai",
wuu = "Wu",
yue = "Yue",
xno = "Anglo-Norman",
}
return langs[code]
end
return p