Module:languages/by name: Difference between revisions
Jump to navigation
Jump to search
Chrysophylax (talk | contribs) (Created page with "local export = {} for code, data in pairs(require("Module:languages/alldata")) do export[data[1]] = code if data.otherNames then for i, otherName in pairs(data.otherNam...") |
(No difference)
|
Latest revision as of 04:56, 2 January 2021
- The following documentation is located at Module:languages/by name/doc.[edit]
- Useful links: root page • root page's subpages • links • transclusions • testcases • sandbox
local export = {}
for code, data in pairs(require("Module:languages/alldata")) 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
if data.aliases then
for i, alias in pairs(data.aliases) do
if not export[alias] then
export[alias] = code
end
end
end
end
return export