模組:languages/by name
呢個模組嘅解說可以喺模組:languages/by name/doc度開
local export = {}
local function iterate(list)
for code, data in pairs(list) do
export[data[1]] = code
if data.otherNames then
for i, otherName in pairs(data.otherNames) do
if not export[otherName] then
export[otherName] = code
end
end
end
end
end
iterate(mw.loadData("Module:languages/data2"))
for letter in mw.ustring.gmatch("abcdefghijklmnopqrstuvwxyz", "(.)") do
iterate(mw.loadData("Module:languages/data3/" .. letter))
end
iterate(mw.loadData("Module:languages/datax"))
return export