มอดูล:R:Duden
- เอกสารการใช้งานต่อไปนี้ตั้งอยู่ที่ มอดูล:R:Duden/documentation [แก้ไข]
- ลิงก์ที่เป็นประโยชน์: รายชื่อหน้าย่อย • การรวมมา • มอดูลทดสอบ
This module implements {{R:Duden}}
.
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 link = ""
if termURLCode == '' then
link = "''Duden'' online"
else
link = "“[https://www.duden.de/rechtschreibung/"..termURLCode..' '..title.."]” ใน ''ดูเดิน'' (Duden) ออนไลน์"
end
return link
end
return export