Module:User:Surjection/langname

This is a private module sandbox of Surjection, for their own experimentation. Items in this module may be added and removed at Surjection's discretion; do not rely on this module's stability.


local export = {}
local data = mw.loadData("Module:languages/code to canonical name")

function export.show(frame)
	return data[frame:getParent().args[1]] or error("Unrecognized or missing language code")
end

function export.direct(frame)
	return data[frame.args[1]] or error("Unrecognized or missing language code")
end

return export