Aller au contenu

Module:R:jam:Allsopp

Avy amin'i Wikibolana — Rakibolana malagasy malalaka

La documentation pour ce module peut être créée à Module:R:jam:Allsopp/doc

local exports = {}

local lang = require("Module:languages").getByCode("jam")
local PAGENAME = mw.title.getCurrentTitle().text

-- The main entry point.
-- This is the only function that can be invoked from a template.
function exports.create(frame) 
    
	local pageNum = frame.args['pageNum'] or error("Please pass parameter pageNum to the module invocation.")
    if pageNum == nil or pageNum == '' then
        error("pageNum variable is empty.")
    end
    
    local pageNumNumeral = tonumber(pageNum)
    if pageNumNumeral ~= nil then
        if pageNumNumeral < 1 or pageNumNumeral > 697 then
            error("This reference only has 697 numbered pages.")
        end
    end
    
    -- see https://en.wiktionary.org/wiki/Wiktionary:References
    local output = "Richard Allsopp, editor, ''Dictionary of Caribbean English Usage'', Kingston, Jamaica: [[w:University of the West Indies Press|University of the West Indies Press]], 1996 (2003 printing), <small>[[Special:BookSources/9789766401450|→ISBN]]</small>, page " .. pageNum

	return output
end

return exports