Module:Character

--

local p = {}

-- Gender

local genderParameters = { ["female"] = "Female ", ["male"] = "Male ", }

function p.gender(frame) local result = '' for gend in mw.text.gsplit(string.lower(frame.args[1]), ',') do		if genderParameters[gend] then -- skip invalid values result = result .. genderParameters[gend] .. ' '		end end return string.sub(result, 1, -8) -- remove last whitespace end

-- Race

local raceParameters = { ["altmer"] = "Altmer ", ["high elf"] = "Altmer ", ["argonian"] = "Argonian ", ["bosmer"] = "Bosmer ", ["wood elf"] = "Bosmer ", ["breton"] = "Breton ", ["dunmer"] = "Dunmer ", ["dark elf"] = "Dunmer ", ["imperial"] = "Imperial ", ["khajiit"] = "Khajiit ", ["nord"] = "Nord ", ["orsimer"] = "Orsimer ", ["orc"] = "Orsimer ", ["redguard"] = "Redguard ", }

function p.race(frame) local result = '' for rac in mw.text.gsplit(string.lower(frame.args[1]), ',') do		if raceParameters[rac] then -- skip invalid values result = result .. raceParameters[rac] .. ' '		end end return string.sub(result, 1, -8) -- remove last whitespace end

return p

--