Module:Country links: Difference between revisions

Content deleted Content added
refactor for easier testing of different languages
improve fallback
Line 59:
function p.get_country_name( language_code, country_code )
local name
if country_names_data[language_code] == nil then
language_code = 'en'
end
local name =if country_names_data[language_code][country_code] == nil then
name = country_names_data['en'][country_code]
else
name = country_names_data[language_code][country_code]
end
return name
end