Open main menu

Wikimedia Commons β

Template:Countries of Europe

Dialog-warning-orange.svg Note: This template is used on a lot of pages. In order not to put too much load on the servers, edits should be kept to a bare minimum. Please discuss proposed changes on the talk page first.
  • Editing a template causes all pages that use the template to be re-rendered. If the template is used often, this can put a lot of load on the servers since it fills up the job queue.
  • Keep in mind that templates that are used on file description pages also show up on other wikis.
Documentation icon Documentationviewedithistorypurge

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

Displays a navigation box with links to similar galeries or categories for every country in Europe. Its shows a list of links with country names translated in the current user language, and sorted according to the correct sort rules for that language (provided that the correct sorted list is defined for that language within this template, and that country names are correctly translated in Wikidata).

Usage

{{Countries of Europe |prefix= |suffix= }}

Template parameters

Parameter Description Default Status
prefix
initial part of the full page or category (for a category, prepend a colon as in ":Category:") before the English country name empty optional
suffix
final part of the full page or category after the English country name empty optional
sep
Replaces the space in the category name between prefix, country name and suffix. Useful in cases such as Category:Euro coins (Austria). If you need distinct separators on both sides, set this parameter to an empty value and put the appropriate separators in the prefix and/or suffix.   optional
all
for debugging only, in categories listing all countries: if non-empty, list links for all countries without testing them for their existence (will generate red links), and enumerate candidate links with their English name. Set it temporarily to show links to the correct subcategories to create, once the list is complete unset it. empty optional

Additional information

The template is intended to be used in the following namespaces: no namespace specified

The template is intended to be used by the following user groups: no user group specified

Relies on:

See also

This template is the only one to use in pages, the following templates are used internally as helpers to generate the list of countries.

If you need to define a new country (this should occur extremely rarely, only if that country is subcategorized separately in Category:Countries of Europe),
  1. First edit Template:Countries of Europe/catname to map a new code to the name of the prefered category name in English (the variable parameter 1 will be "the" or empty, don't insert it if the country name in English never has an article after "in", "of".
  2. Add an item (if needed) in Template:Countries of Europe/list to support an additional entry (you should have at least as many items as countries to display).
  3. Now append this new country code in all sorted lists in this template. To sort it correctly, you'll need to revisit this page in each enumerated language to fix its position. All country codes in these lists are from ISO 3166-1.
    For territories or countries with specific status or with limited recognition that have no 2-letter ISO 3166-1 codes, the following 4-letter abbreviations are used:
    AKDH = Akrotiri and Dhekelia, ABKH = Abkhazia, ARTS = Artsakh, KOSO = Kosovo, NOCY = Turkish Republic of Northern Cyprus, SOSS = South Ossetia-Alania, TRAN = Transnistria
  4. Make sure that all sorted lists have the same length and that they contain the same set of codes, and that the same code is not used twice in the same sorted list.

Localization

To add your language to the list of languages supported by this template, please edit the template and add a row to the "{{LangSwitch|}}" construct. It takes the form "|xx= Your translation " (xx being the code of your language)

To translate and sort the list in additional languages,
  1. First make sure you select the language with the Universal Language Selector in top toolbar of the wiki. Make sure that all countries names are properly translated (names are generated by templates named like the country in English, using {{Label}}, which takes now the value from Wikidata). Ideally these translated names should be using a short form (long forms may still be added as synonyms in Wikidata but should not be the default names). Make sure the country name is correctly translated in your language (you may need to add a translation by naming the Wikidata element defined for that country; you'll find the Wikidata element by visiting its associated Wikipedia article or Commons galery page and clicking on the edit link in the interlanguage sidebar).
  2. Then edit this template, add or check the translation of the initial heading, then add a line in this for a new list of country codes ordered differently. All lists contain the same country codes just ordered differently (start by copying one line for a related language using the same script, then adjust the order).
  3. Before saving, preview it to check the list generated with names in English in the example shown below to make sure that appropriate countries are selected (otherwise there's an error in some country codes), you will also see the translated list above this documentation in the same order, allowing you to check the expected order (you will just need to swap codes in the list).
Example of rendering with all=1 (for debugging or preview purpose)