Module:Imahero/test/doc: Difference between revisions

From Heroes 3 wiki
Jump to navigation Jump to search
(Created page with "See usage on user:imahero/test.")
 
No edit summary
Line 1: Line 1:
See usage on [[user:imahero/test]].
See usage on [[user:imahero/test]].
Example of embedding code on a page (this code does nothing and is just for show):
<syntaxhighlight lang="lua" line='line'>
local p = {} --p stands for package
function p.test( frame )
    return frame
end
langObject = mw.getLanguage( 'simple' )
function p.language( frame )
    return langObject:getCode()
end
function p.arrow( frame )
    return langObject:getArrow( frame.args.direction )
end
return p
</syntaxhighlight>

Revision as of 21:03, 2 December 2023

See usage on user:imahero/test.

Example of embedding code on a page (this code does nothing and is just for show):

local p = {} --p stands for package

function p.test( frame )
    return frame
end

langObject = mw.getLanguage( 'simple' )

function p.language( frame )
    return langObject:getCode()
end

function p.arrow( frame )
    return langObject:getArrow( frame.args.direction )
end

return p