This documentation is transcluded from Template:Countries of Africa/doc.

Displays a navigation box with links to similar galleries or categories for every country in a region. Links to existing pages are displayed using country names in the current user's language. Country names are obtained from Wikidata.


{{Countries of Africa|prefix=:Namespace:Prefix text|suffix=suffix text}}

Template parameters

Parameter Description Default Status
prefix Text inserted before the English country name for each link. empty optional
suffix Text added after the English country name for each link. empty optional
sep Separator between prefix and name, and between name and suffix. space optional
simple For some templates, |simple=yes simplifies the output, omitting some smaller territories. empty optional
all Use |all=yes for a temporary test to show all links without testing for their existence; will show red links. empty optional
nocat Use |nocat=yes for a demonstration where a template with invalid parameters should not output a tracking category. empty optional

Templates and country data

The following templates are implemented by Module:Countries:

Template Data module
{{Countries of Africa}} Module:Countries/Africa
{{Countries of the Americas}} Module:Countries/Americas
{{Countries of Asia}} Module:Countries/Asia
{{Countries of the Caribbean}} Module:Countries/Caribbean
{{Countries of Central America}} Module:Countries/Central America
{{Countries of Europe}} Module:Countries/Europe
{{Countries of North America}} Module:Countries/North America
{{Countries of North America (subcontinent)}} Module:Countries/North America (subcontinent)
{{Countries of Oceania}} Module:Countries/Oceania
{{Countries of South America}} Module:Countries/South America
{{Countries in the United Kingdom}} Module:Countries/United Kingdom

For example, {{Countries of Africa}} contains:


The parameter Africa means data from Module:Countries/Africa is used. Changes to the countries or the text displayed are made in the data module.

Before updating the main data module, changes should be made in the sandbox data module and tested with the sandbox template.

Sandbox template Sandbox data module
{{Countries of Africa/sandbox}} Module:Countries/Africa/sandbox
{{Countries of the Americas/sandbox}} Module:Countries/Americas/sandbox
{{Countries of Asia/sandbox}} Module:Countries/Asia/sandbox
{{Countries of the Caribbean/sandbox}} Module:Countries/Caribbean/sandbox
{{Countries of Central America/sandbox}} Module:Countries/Central America/sandbox
{{Countries of Europe/sandbox}} Module:Countries/Europe/sandbox
{{Countries of North America/sandbox}} Module:Countries/North America/sandbox
{{Countries of North America (subcontinent)/sandbox}} Module:Countries/North America (subcontinent)/sandbox
{{Countries of Oceania/sandbox}} Module:Countries/Oceania/sandbox
{{Countries of South America/sandbox}} Module:Countries/South America/sandbox
{{Countries in the United Kingdom/sandbox}} Module:Countries/United Kingdom/sandbox


{{Countries of Africa|prefix=:Category:Maps of}}

{{Countries of Europe|prefix=:Category:Churches in|suffix=by architectural style}}

{{Countries of Europe|prefix=:Category:Euro coins (|suffix=)|sep=}}
The above would generate links such as Category:Euro coins (Austria), currently unused.

{{Countries of Oceania/sandbox|prefix=:Category:}}
Script error: No such module "Countries/sandbox".

{{Countries of Oceania/sandbox|prefix=:Category:|all=yes}}
Script error: No such module "Countries/sandbox".


If an invalid parameter is used, an error message is displayed when an edit to the page is previewed. If a page with an error is saved, no message is displayed but the page is added to a hidden error tracking category: Category:Countries template with invalid parameters.

The following example misspells suffix. For this demonstration, no tracking category is added because |nocat=yes is used.

{{Countries of Europe|prefix=:Category:Churches in|sufix=by architectural style}}

Previewing an edit with the above template shows the result and a message:
Error: invalid parameter "|sufix=by architectural style"

Community content is available under CC-BY-SA unless otherwise noted.