Modul:R:Google

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

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

local export = {}
 
function export.create(frame)
	local args = frame:getParent().args
	local title = mw.title.getCurrentTitle().text
	local title_url = mw.uri.encode(title, QUERY)
	local link = ""
	if args == '' then
		link = "[https://translate.google.com/ Google Translate]"
	else
		link = "[https://translate.google.com/?sl=" ..args[1].. "&tl=" ..args[2].. "&text=" ..title_url.. " " ..title.. "] - Google Translate (" ..args[1].."-"..args[2]..")"
	end
	return link
end
 
return export