Jump to content

Module:User info 2024: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
No edit summary
Line 7: Line 7:
output = string.gsub(frame.args[1],",","|")
output = string.gsub(frame.args[1],",","|")
return "{{#babel:" .. output .. "}}"
return "{{#babel:" .. output .. "}}"
end

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



Revision as of 20:08, 12 July 2024

-- Formats a Babel parser function call from a list of comma-separated language codes. 
-- Intent is to be used in [[Template:User info 2024]] to allow for a Babel parameter, which takes comma-separated values

local p = {}

function p.convert( frame )
	output = string.gsub(frame.args[1],",","|")
	return "{{#babel:" .. output .. "}}"
end

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

return p