Module:Flags: Difference between revisions

Content deleted Content added
Creating table of shortcuts for frequent flags
Trying to abstract the assignment of values for flags in tables
Line 11:
["England"] = "",
}
 
-- Function for assigning values to flags found in tables
function p.flagValues(territory)
if territory.args[1] == locale or territory.args[1] == english then commonsName = english link = locale end
end
 
-- Loading the flag translations module --
Line 22 ⟶ 27:
return '[[File:Flag_of_' .. territory.args[1] .. '.svg|link=' .. territory.args[1] .. '|22x20px]]' end
-- Searching in the translation table.
for english,locale in pairs(translations.t) do p.flagValues()
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 --