มอดูล:R:Grimm
หน้าตา
- The following documentation is located at มอดูล:R:Grimm/documentation. [edit]
- Useful links: subpage list • links • transclusions • testcases • sandbox
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.."]” in ''[[w:Deutsches Wörterbuch|Deutsches Wörterbuch von Jacob und Wilhelm Grimm]]'', 16 vols., Leipzig 1854–1961."
end
return link
end
return export