Module:links: Difference between revisions

Jump to navigation Jump to search
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 5: Line 5:
error("language link data must contain term")
error("language link data must contain term")
end
end
local link = "[[" .. data.term
local link = data.term
if data.language then
local alt = data.alt or data.term
link = link .. "#" .. data.language.code
if data.language and data.language.proto then
alt = "*" .. alt
link = "Appendix:" .. data.language.name .. "/" .. data.term
elseif data.language then
link = link .. "#" .. string.gsub(data.language.name, " ", "_")
end
end
return link .. "|" .. (data.alt or data.term) .. "]]"
return "[[" .. link .. "|" .. alt .. "]]"
end
end


Navigation menu