Module:Flags: Difference between revisions

Content deleted Content added
mNo edit summary
Reverting again. doh.
Line 9:
 
-- Frequent flags in your wiki --
["England"] = "England",
}
 
Line 17:
end
 
-- Loading the flag translations module --if the flags can't be found in frequentFlags
local translations = require "Module:Sandbox/QuimGil/FlagTranslations"
 
Line 26:
if territory.args[1] == "Nepal" or territory.args[1] == "Ohio" then
return '[[File:Flag_of_' .. territory.args[1] .. '.svg|link=' .. territory.args[1] .. '|22x20px]]' end
-- Searching in the frequentFlags table.
for english,locale in pairs(frequentFlags) do p.flagValues(territory)
end
-- Searching in the translation table.
-- for english,locale in pairs(translations.t) do p.flagValues(territory)
-- 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
return '[[File:Flag_of_' .. commonsName .. '.svg|border|link=' .. link .. '|22x20px]]'
end