A modult a Modul:R:Grimm/doc lapon tudod dokumentálni

local export = {}
 
local chart = { ['ä']='ae', ['ö']='oe', ['ü']='ue',
                ['Ä']='Ae', ['Ö']='Oe', ['Ü']='Ue',
                ['ß']='sz', ['-']='_'              }

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 = args['w'] or args[2] or mw.title.getCurrentTitle().text
	local termURLCode = args[1] or mw.ustring.gsub(title,'[äöüÄÖÜß-]',chart)
	local dictionary = args['dictionary'] or "DWB"
	local link = ""
	
	if termURLCode == '' then
		link = "''Deutsches Wörterbuch von Jacob und Wilhelm Grimm'', 16 vols., Leipzig 1854–1961."
	else
		link = "[https://woerterbuchnetz.de/?sigle="..dictionary.."&lemma="..termURLCode..' '..title.."] <span style=\"white-space:nowrap\">- ''Grimm''</span>"
	end
	return link
end
 
return export