Jump to content

Մոդուլ:Wikidata/alias

Վիքիպեդիայից՝ ազատ հանրագիտարանից

Documentation for this module may be created at Մոդուլ:Wikidata/alias/doc

-- модуль возвращает синонимы для данной страницы
 
local p = {}
 
function p.get()
	local s=""
	t= mw.wikibase.getEntityObject()
	if t then 
		t= t.aliases
		if t then 
			if t["hy"] then 
				for i, k in pairs(t["hy"]) do
					s = s .. k["value"] .. ", "
				end
			return string.sub(s,1,string.len(s)-2)
			end
		end
	end
	return s
end
 
return p