Module:Special page interlanguage links/sandbox

From Bonkipedia

Documentation for this module may be created at Module:Special page interlanguage links/sandbox/doc

local p = {}

function p._main(specialPageName)
	local links = {}
	for n, _ in pairs(mw.site.interwikiMap('local')) do
		if mw.language.isKnownLanguageTag(n) then
			table.insert(links, string.format('[[%s:Special:%s]]', n, specialPageName))
		end
	end
	table.sort(links)
	return table.concat(links)
end

function p.main(frame)
	return p._main(frame.args[1])
end

return p