Module talk:Country population: Difference between revisions

Content deleted Content added
Template wrapper: using stored lists of countries
Line 37:
 
{{Country populations|list=South America}}
 
The above table is generated with <code><nowiki>{{Country populations|list=South America}}</nowiki></code>. The list of countries is stored in a table as follows:
<pre> local country_lists = {
['South America'] = { "ARG","BOL","BRA","CHL","COL","ECU","GUY","PRY","PER","SUR","URY","VEN","BVT","FLK","SGS","GUF" }
}
</pre>
At the moment it is just a local variable in the function, but I suggest putting them in a subpage of the module. Then the subpage can be used by other modules. —&nbsp;<span style="font-family:Arial;background:#d6ffe6;border:solid 1px;border-radius:5px;box-shadow:darkcyan 0px 1px 1px;">&nbsp;[[User:Jts1882|Jts1882]]&nbsp;&#124;[[User talk:Jts1882|&nbsp;talk]]&nbsp;</span> 16:26, 14 June 2021 (UTC)