Module:links/templates: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 68: Line 68:
end
end
--[[
-- Forward the information to full_link
Add a language name, linked to Wikipedia if the Wikipedia parameter is set to true.
return require("Module:links").full_link(  
Forward the information to full_link.
]]
local language_name = args.w and lang:makeWikipediaLink() or lang:getCanonicalName()
if term == "-" then
return language_name
else
return language_name .. " " ..
require("Module:links").full_link(  
{
{
lang = lang,  
lang = lang,  
Line 104: Line 95:
allowSelfLink
allowSelfLink
)
)
end
end
end


Line 197: Line 187:
["ts"] = {},
["ts"] = {},
["sc"] = {},
["sc"] = {},
["w"] = { type = "boolean", default = false },
["w"] = { type = "boolean", default = true },
}
}
Line 221: Line 211:
-- Check parameters
-- Check parameters
lang = require("Module:languages").getByCode(lang, 1, "allow etym")
lang = require("Module:languages").getByCode(lang, 1, "allow etym", true)
local non_etym_lang = require("Module:languages").getNonEtymological(lang)
local non_etym_lang = require("Module:languages").getNonEtymological(lang)