Module:R:Duden
Appearance
- The following documentation is located at Module:R:Duden/documentation. [edit]
- Useful links: subpage list • links • transclusions • testcases • sandbox
This module implements {{R:Duden}}
.
local export = {}
local chart = { ['ä']='ae', ['ö']='oe', ['ü']='ue',
['Ä']='Ae', ['Ö']='Oe', ['Ü']='Ue',
['ß']='sz', ['-']='_', [' ']='_',
["'"]='_' }
function export.create(frame)
local params = {
[1] = {},
[2] = {},
["w"] = {alias_of = 2},
}
local args = require("Module:parameters").process(frame:getParent().args, params)
local title = args[2] or mw.title.getCurrentTitle().text
local termURLCode = args[1] or mw.ustring.gsub(title,'.',chart)
local link = ""
if termURLCode == '' then
link = "''Duden'' online"
else
link = "“[https://www.duden.de/rechtschreibung/"..termURLCode..' '..mw.text.nowiki(title) .."]” in ''Duden'' online"
end
return link
end
return export