Module:Sandbox

From Asmbly Wiki

Documentation for this module may be created at Module:Sandbox/doc

Script error: Lua error: Internal error: The interpreter exited with status 127.

local p = {} --p stands for package

function p.hello( frame )
	-- Get wiki from input
	-- {{#invoke:cil|Q42|wiki}}? {{cil|Q42|wiki}}? "cross-wiki inter-language link"
	-- Get user language ({{userlang}} does this, but how to do it in Lua?)
	-- Combine user language code with project (e.g. en + wiki)
	-- Check if it exists:
    return mw.wikibase.getSitelink( 'Q42', 'orcawiki' )
    -- Will return the page name if exists, else returns nil
    -- If page name, link: [[en:w:page]], etc
    -- If not exist, link to Wikidata
end

return p