Module:CustomScript

--Zhakar Wiki Custom Language Conversion --http://zhakar.wikia.com/ --Initial wikitext implementation by User:Flaicher --Lua conversion by User:ChickenBar --Modified for Zhakar Wiki by User:Vivaporius

local p = {}

local CharData = mw.loadData( 'Module:CustomScript/data' )

function p._xanian( humanwords, size ) local output_string = {} local humanwords = string.lower(humanwords) local span = mw.html.create( 'span' ) if (size == nil or size == '') then size='14' end for i=1, string.len(humanwords) do       local replacement = CharData["XanianChar"][humanwords:sub(i,i)] if replacement ~= nil then table.insert(output_string,'') else table.insert(output_string,' ') end end span   :css( 'font-size', size..'px' ) :wikitext( table.concat(output_string) ) return tostring(span) end

function p.xanian( frame ) local string_input = frame.args[1] local num_input = frame.args[2] return p._xanian(string_input, num_input) end return p