Module:Imahero/test/doc: Difference between revisions
< Module:Imahero | test
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
See usage on [[user:imahero/test]]. | See usage on [[user:imahero/test]].<noinclude> | ||
Example of embedding code on a page (this code does nothing and is just for show): | Example of embedding code on a page (this code does nothing and is just for show): | ||
Line 20: | Line 20: | ||
return p | return p | ||
</syntaxhighlight> | </syntaxhighlight></noinclude> |
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