Module:data/interwikis

From Linguifex
Revision as of 22:28, 6 August 2024 by Sware (talk | contribs) (Created page with "local data = {} local gsub = string.gsub local next = next local ulower = require("Module:string utilities").lower for _, interwiki in next, mw.site.interwikiMap() do data[ulower((gsub(interwiki.prefix, "_", " ")))] = interwiki.isCurrentWiki and "current" or interwiki.isLocal and "local" or "external" end return data")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

local data = {}

local gsub = string.gsub
local next = next
local ulower = require("Module:string utilities").lower

for _, interwiki in next, mw.site.interwikiMap() do
	data[ulower((gsub(interwiki.prefix, "_", " ")))] =
		interwiki.isCurrentWiki and "current" or
		interwiki.isLocal and "local" or
		"external"
end

return data