Content deleted Content added
Making fallback icons clickable by default |
In the absence of translation for an existing entry, links to the english/original name |
||
Line 14:
for english,locale in pairs(translations.t) do
if territory.args[1] == locale or territory.args[1] == english then commonsName = english link = locale end
end▼
-- In the absence of translation for an existing entry, links to the english/original name --
if commonsName ~= nil and link == '' then link = commonsName end
-- Fallback to Commons when the parameter doesn't have a translation in the table. The flag doesn't have a link, then.
if commonsName == nil then commonsName = territory.args[1] link = territory.args[1] end
▲ end
return '[[File:Flag_of_' .. commonsName .. '.svg|border|link=' .. link .. '|22x20px]]'
end
|