Template:Countries of Europe/sandbox

Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Countries of Europe/doc.

Displays a navigation box with links to similar galleries 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

ParameterDescriptionDefaultStatus
prefixInitial part of the full page or category (for a category, prepend a colon as in ":Category:") before the English country nameemptyoptional
suffixFinal part of the full page or category after the English country nameemptyoptional
sepReplaces 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
allFor 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.emptyoptional

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:

Example

{{Countries of Europe|prefix=:Category:}}

renders as:

See also

See Template:Countries of Africa/doc#Templates and country data for a list of similar templates of other regions.
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), edit the data module Module:Countries/Europe, which defines the Wikidata entry for translating them and custom sort order for specific languages when automatic sort by name does not work as expected. 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

This template is localized by utilizing Wikidata, via {{Label}} template or similar approach.

This template is fully translated from Module:Countries/Europe for headings, and from the Wikidata items listed in this module.

Former subtemplates
this template is the only one to use in pages, the following templates were used internally as helpers to generate the list of countries.
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).