Module:Flags: Difference between revisions

Content deleted Content added
test
Test
Line 2:
 
-- FIXME: include a short list of popular flags here (United States, China...) to avoid loading the module just for them
local frequentFlagsshortcuts = {
-- Frequent flags globally --
Line 12:
}
 
-- Loading the flag translations module if the flags can't be found in frequentFlags--
-- 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 if the flags can't be found in frequentFlags
local translations = require "Module:Sandbox/QuimGil/FlagTranslations"
 
Line 27 ⟶ 22:
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(territory)
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 --