Module:CustomScript

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

local p = {}

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

function p._banum( 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["BanumChar"][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.banum( frame ) local string_input = frame.args[1] local num_input = frame.args[2] return p._banum(string_input, num_input) end

return p