| Alpha | This module is rated as alpha. It is ready for third-party input, and may be used on a few pages to see if problems arise, but should be watched. Suggestions for new features or changes in their input and output mechanisms are welcome. |
This is meant for replacing {{link language}}.
Usage
{{#invoke:Language/external links|main| ... }}
Examples
{{#invoke:Language/external links|main|fr}}
- (French)
{{#invoke:Language/external links|main|fr|de}}
- (French) (German)
{{#invoke:Language/external links|main|fr|de|ja|en|sv|ru}}
- (French) (German) (Japanese) (English) (Swedish) (Russian)
- ...
{{#invoke:Language/external links|main|fr|French}}
- (French) (French)
See also
local getArgs = require("Module:Arguments").getArgs
local getName = require("Module:Language/name").fuzzy
return {
main = function (frame)
local args = getArgs(frame)
local out = {}
for k, v in pairs(args) do
local name = getName{code=v}
table.insert(
out,
tostring(
mw.html.create("span")
:attr("style", "font-size: 0.95em; font-weight: bold; color: #555")
:wikitext("(" .. (name ~= "" and name or v) .. ")")
)
)
end
return table.concat(out, " ")
end
}
