Module:R:Blöndal

This module implements {{R:Blöndal}}; code based on Module:R:Grimm and Module:R:The Bokmål and Nynorsk dictionaries.


local export = {}

function export.create(frame)
	local args = frame:getParent().args
	if args['w'] and args[2] then
		error("please specify only either |w= or |2=")
	end
	local title = mw.title.getCurrentTitle().text
	local target = args['w'] or args[2]
	local entryid = args['id'] or args[1]
	local base = "Sigfús Blöndal et al., “[https://blondal.arnastofnun.is/"
	local spec = ""
	local spec2 = ""
	local work = "]” in ''Íslensk-Dönsk Orðabók [An Icelandic-Danish Dictionary]'', Reykjavík, 1920-1963. [https://blondal.arnastofnun.is/ Digitalisation] by [[w:Árni Magnússon Institute for Icelandic Studies|The Árni Magnússon Institute for Icelandic Studies]]."
	local link = ""
	
	if entryid then
		spec = "faersla/" .. entryid .. "/merkja/"
	else
		spec = "leit/?leit="
	end	
	
	if target then
		spec2 = "".. target .. ' '.. target ..""
	else
		spec2 = "".. title .. ' '.. title ..""
	end

	link = "".. base .. spec .. spec2 .. work ..""
	return link
end
 
return export