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

function export.create(frame)
	local args = frame:getParent().args
	local title = args['w'] or mw.title.getCurrentTitle().text
	local termURLCode = args[1] or mw.ustring.gsub(title,'[äöüÄÖÜß-]',chart)
	local link = ""
	if termURLCode == '' then
		link = "LEO詞典"
	else
		link = "[https://dict.leo.org/%E5%BE%B7%E8%AF%AD-%E6%B1%89%E8%AF%AD/"..termURLCode..' '..title.."] 在 ''LEO詞典'' 上的解释"
	end
	return link
end
 
return export