Ugrás a tartalomhoz

Modul:R:dictzone

A Wikiszótárból, a nyitott szótárból

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

local export = {}
 
local chart = {
['bg']='bolgar',
['cs']='cseh',
['da']='dan',
['et']='eszt',
['fr']='francia',
['el']='gorog',
['de']='nemet',
['no']='norveg',
['nl']='holland',
['pl']='lengyel',
['la']='latin',
['it']='olasz',
['ru']='orosz',
['pt']='portugal',
['ro']='roman',
['es']='spanyol',
['sk']='szlovak',
['sv']='sved',
['tr']='torok',
['uk']='ukran', 
 }

function export.create(frame)
	local args = frame:getParent().args
	local title = mw.title.getCurrentTitle().text
	local title_url = mw.uri.encode(title, QUERY)
	local code1 = args[1]

	local langFrom =  mw.ustring.gsub(code1,'..',chart)
	local link = ""
	if args == '' then
		link = "[https://dictzone.com Dictzone]"
	else
		link = "[https://dictzone.com/"..langFrom.."-magyar-szotar/" .. title_url .. " " ..title.. "] - ''Dictzone'' (" ..args[1].."-hu)"
	end
	return link
end
 
return export