Module:Countries/European Union

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Lua

CodeDiscussionEditHistoryLinksLink count Subpages:DocumentationTestsResultsSandboxLive code All modules

This documentation is transcluded from Module:Countries/Africa/doc.

The countries and text displayed for a particular region are defined in a subpage of Module:Countries. For example, Module:Countries/Africa lists the countries in Africa and defines text such as "Countries of Africa" that is displayed if the user's language is en, and "Staaten in Afrika" if it is de. Country names are obtained from Wikidata.

How to create data modules[edit]

Translated section titles[edit]

Each section under titles defines text that depends on the current user's language. The procedures that apply to {{Fallback}} are used to determine which language should be used.

TODO: Standard titles should be defined in one module so they do not need to be duplicated for each countries submodule. Only items listed in each section are translated once from Wikidata labels. This may require adding also Wikidata entries for them (or locating existing Wikidata items for their topic), and being able to select their plural form when needed.

Pattern or ordered list of subpatterns[edit]

Module:Countries/Africa defines pattern twice. The first is a pattern for the text that is normally displayed by {{Countries of Africa}}, while the second applies when the parameter |simple=yes is used.

Each occurrence of {name} in the pattern is replaced with appropriate text. The names used for Africa when simple does not apply are:

Name Description
{lang} User's language from {{Int:Lang}} such as "en" or "de".
{dir} Direction "ltr" or "rtl" selected using lang.
{colon} Equivalent of ": " from {{Colon|lang={{Int:Lang}}}}; do not insert any space after it.
{maintitle} Title from titles.main selected using lang.
{othertitle} Title from titles.other selected using lang.
{mainlist} List of country codes from lists.main selected using lang.
{otherlist} List of country codes from lists.other selected using lang.
{partlylist} List of country codes from lists.partly used to render a note only (this list is not sorted by languages as it is not displayed, but it provides the condition for which the note will be added, i.e. when one of the other lists includes a country which is displayed with an extra mark calling for this note).

You can specify patterns in various ways, the simplest one being a single string containing all the layout wikitext and {name} placeholders described above. This will only generate a static list with a single layout.

But you can also split the pattern into multiple "conditional supatterns" (all of them containing arbitrary wikitext or {name} placeholders), and put them in an ordered table, in the order in which they must appear on the result. This allows some fragments of the layout to be removed (for example dropping the section title if the list after it in the same section is empty, or dropping the static separators between sections).

Each "conditional subpattern" is represented either:

  • as a simple string like 'subpattern with {name} placeholders' when there's no condition (this unconditional pattern will be always added to the result), or
  • as an ordered table, where:
    • first element is a string for the subpattern, and
    • the other elements represent an union of several (non-exclusive) "conditions"
    for example, { 'subpattern with {name} placeholders', condition1, condition2, ... }
    (if any one of the listed conditions evaluates to true (OR), the conditional subpattern will be used).

Each "condition" listed in a array after the initial subpattern may itself be represented either:

  • as a simple string for "simple conditions", or
  • as an ordered table of "subconditions", i.e. a conjunction of several (non-exclusive) simple conditions
    for example, { 'subpattern with {name} placeholders', { subcondition1, subcondition2, ... }, ... }
    (if any one of the subconditions evaluates to false (AND), the conditional subpattern will NOT be used according to this condition, but may be used if other conditions part of the union allow it).

Each "simple condition" is used to evaluate tests based on names of variables (usable in placeholders of patterns or subpatterns). A simple condition is represented by a string and can currently take one the following forms:

  • 'name'  : the simple condition is true if the variable with that name is non-empty (i.e. the subpattern {name} would be replaced by an actual text);
  • '!name' : the simple condition is true if the variable with that name is empty (i.e. the subpattern {name} would be replaced by nothing);

The variable names used in simple conditions don't need to be present within the "conditional subpattern" string to which the condition applies (indicated at start of the table describing the conditional subpattern). This means for example that a subpattern continaining only static wikitext and no {name} placeholder, can be conditional. This is useful notably

  • to generate static wikitext (for example breaks or punctuation or other presentational elements), that will be present in the result only if other conditional patterns actually generate text (depending on their own placeholders).
  • to suppress every layout elements surrounding the inner content, when there's nothing useful to display: the result can then be entirely empty.

Simple presentation in a single section[edit]

If the template that invokes the module has |simple=yes, the simple section is used.

  • simple.pattern replaces pattern
  • simple.sections specifies which sections from titles and lists will be processed.

In Module:Countries/Africa, simple.sections has

main = { EH = true, },

The fact that main is defined means that titles.main and lists.main will be used. The fact that other is not defined means that titles.other and lists.other will be ignored.

EH = true is used when simple does not apply. When the template is used normally (without |simple=yes), the country identified by EH is ignored. That is done because EH is included in the other section. However, with |simple=yes, EH will appear in the main section.

The simple version can also use a single pattern, or multiple conditional subpatterns like previously.

Orderable lists of items, one for each section[edit]

Each section under lists defines the list of country codes that will be used to display country names. Similarly to titles, the list depends on the current user's language.

Countries are listed in the order specified. If the default order is unsatisfactory for a particular language, an entry for the language can be added. The entry should include all the country codes in a suitable order.

For example, lists.main may include the following (... replaces some text omitted for simplicity).

main = {
    english   = 'automatic',
    default   = 'automatic sorted',
    en        = 'automatic sorted',
    mk        = 'DZ AO BJ BW BF BI CM CAVE CF TD KM CI ... SADR EH ZM ZW',
    automatic = 'DZ AO BJ BW BF BI CM CAVE CF TD KM CD ...   UG EH ZM ZW',
},

Each country code such as DZ is defined under countries. All lists should contain the same codes, only ordered differently depending on language; every localized list (keyed by language code) should then have exactly the same length as the one given for the 'automatic' list (which is required), or should be one of 'automatic sorted' or 'automatic'.

The following keys have special meaning when used before =.

automatic Must be defined if any other parameter is set to 'automatic' or 'automatic sorted'. The listed codes should be ordered according to the English names, so that they don't need sorting (see below).
default The fallback entry used if the user's language is not defined ({{Fallback}} falls back to en if it is defined and no more applicable entry is defined).
english The entry used if the user's language is en. This is an optimization to avoid the overhead of automatic processing for a commonly used language.

The following values have special meaning when used after =.

'automatic' This entry will use the list of country codes defined in the automatic = '...' parameter.
'automatic sorted' Same as 'automatic' but (unless option all is set) the country names will be reordered using a crude sorting algorithm.

A module is not able to properly collate names for a language other than en. However, Module:Countries can satisfactorily collates some names that use letters with diacritics which sort after their equivalent letters.

The collation (performed only when the option all is not set when calling the main function Module:Countries) is based on a function, defined in Module:MakeSortKey, creating sort keys from a translated label and the target language code (this language code could be later used to tailor the collation according to sorting rules for specific languages, but for now the sort order is locale-neutral). Generally, this sorting works for most languages, but the localisation may be needed to take into account ignorable prefixes, or for complex scripts that still have no support for a basic collation order.

Definitions of each list item[edit]

Several examples from a countries table follow.

countries = {
    CI    = { 'Ivory Coast', "Côte d'Ivoire",  qid = 'Q1008', },
    DZ    = { 'Algeria',                       qid = 'Q262', },
    EG    = { 'Egypt',                         qid = 'Q79', mark = '‡', },
    GM    = { 'Gambia',                        qid = 'Q1005', the = true, },
    XBRTW = { 'Bir Tawil',                     qid = 'Q620634', },
}

CI, DZ, EG, and GM are country codes that identify a particular country. Where available, ISO 3166-2 codes are used, but any code can be used as they only have a meaning within the module (you should use a private extension, starting by "X", of ISO 3166-1 if the territory is part of another recognized country but has no ISO 3166-2 code, or use one of the prefixes reserved in ISO 3166-1 for private use, like "AA", "QM" to "QZ", "X", or "ZZ").

The country names Algeria and Gambia are the titles of pages which should exist at Commons, and where the category page generally also exists. English names should be used but need to match names used in titles of titles in Commons. If several alternative names are used in Commons to refer to the same country in related page titles (such as "Côte d'Ivoire"), you may list these alternate names.

The qid codes identify the corresponding item at Wikidata. It allows translating the displayed label in the user's language (when option all is not set to render the box). For example,

  • d:Q262 on Wikidata is associated to Algeria on Commons, and will also be used to get the translated label for other related pages like Category:Algeria
  • d:Q1005 on Wikidata is associated to Gambia on Commons, and will also be used to get the translated label for other related pages like Category:Gambia

If the |all=yes option is not set to render the box, or if qid is not defined, or if qid is not found in Wikidata, or Wikidata does not define a label for it, then the first name listed in the data defining the country (normally in English and used in page titles in Commons) will be used as a default (untranslated) label.

Normally, a link is shown in the rendered bulleted lists only if the page exists.

But when rendering the list with |all=yes option, all possible page titles will be listed, without testing their existence, and without translating the displayed labels (this will frequently generate red links, but it allows the maintenance of page names on Commons, to find those that redirect to unexpected pages, or to facilitate the creation of missing pages with coherent titles that will be found and used when the |all=yes option will be removed to hide all possible aliases from the list and to get translated and sorted labels).

The entry for Gambia illustrates use of the optional the in country's data, whose effect is that the Gambia is tested for existence before Gambia: if a page exists in Commons using the in its title, this page will be selected as the target of the link.

The wikitext for each link has the following form:

[[PrefixTitleSuffix|<bdi>Label</bdi>]]
Prefix Consists of the specified prefix and separator (or space).
Title The name specified in the countries table, possibly prefixed by the (only if the data defining a country code includes the = true).
Suffix Consists of the specified separator (or space) and suffix.
bdi bidirectional isolation in HTML
Label The label from Wikidata for the specified qid in the current user's language.

The entry for Egypt illustrates use of the optional mark in country's data, whose effect is that a superscripted mark will be added after the label. This is used as a note call, which will be rendered at bottom of the table. If you use such marks, you should create a conditional section (such as "partly") which lists all concerned codes (in arbitrary code order); this list will not be rendered, but will appear conditionally if any one of the listed codes is displayed from the other lists.

Related modules and templates[edit]

This list (currently maintained in Module:Convert/tester) is partial but contains the most frequently used modules. It autodetects differences between the normal modules and templates and their sandbox version, and list their associated testcases and talk pages (when they exist).

It also shows that the main module is not necessarily used for listing countries (or territories), it could be used as well to create navigation boxes for lists of cities, chemical elements, and so on, provided that these lists are bounded, wellknown and stable over years (and not overlong) : if a list contains more than 200 items, consider generated separate modules and navbox for sublists using some criteria). New data modules also don't necessarily have to be created and named as subpages of Module:Countries.

The sandbox versions of modules should be identical, except temporarily for testing changes (rendered with the sandbox template, in their comparative test cases)

Modules in Commons

Templates in Commons using these modules

The sandbox versions of these templates should be different as they use the sandbox version of the modules.

How to make changes and preview them using sandboxes[edit]

For example, {{Countries of Africa/sandbox}} displays:

If the user's language is en, Module:Countries/Africa/sandbox could be edited and

en = 'Countries of Africa',

changed to

en = 'African countries',

Do not save the change. Instead, under "Preview page with this template" enter the title of this page

Module:Countries/Africa/doc

then click "Show preview". That will display this documentation page including the output from the above {{Countries of Africa/sandbox}} template. The output will start with "African countries" instead of "Countries of Africa". In the same manner, other changes could be made and previewed before saving the changes. Close the current browser window without saving the changes to discard them (or get back to a previous page using the button of the browser navigating in the session history).

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

Code

--[=[
Data defining countries for {{#invoke:Countries|main|Europe}}.

Output is pattern after making these substitutes:
	{lang}		User's language from {{int:lang}} such as 'en' or 'de'.
	{dir}		Language direction 'ltr' or 'rtl'.
	{colon}		Language equivalent of ": " from {{colon|lang}}.
	{XYZtitle}	Title for lang from XYZ section of defined titles.
	{XYZlist}	List of countries for lang from XYZ section of defined lists.
Where XYZ must consist of en alphabetic characters [A-Za-z].
]=]
return {
	titles = {
		main = {
			default = 'Member states of the European Union',
			['be-tarask'] = 'Краіны-чальцы Эўрапейскага Зьвязу',
			ca = 'Estats membres de la Unió Europea',
			de = 'Mitgliedsstaaten der Europäischen Union',
			bn = 'ইউরোপীয় ইউনিয়নের সদস্য রাষ্ট্র',
			cs = 'Členské státy Evropské unie',
			en = 'Member states of the European Union',
			es = 'Estados miembros de la Unión Europea',
			eo = 'Membroŝtatoj de la Eŭropa Unio',
			it = 'Paesi membri dell’Unione europea',
			fr = 'États membres de l’Union européenne',
			ja = '欧州連合加盟国',
			ml = 'യൂറോപ്യൻ യൂണിയനിലെ അംഗരാജ്യങ്ങൾ',
			nb = 'Medlemsland i Den europeiske union',
			nl = 'Lidstaten van de Europese Unie',
			nn = 'Medlemsland i Den europeiske unionen',
			no = 'Medlemsland i Den europeiske union',
			sl = 'Države članice Evropske unije',
			sr = 'Државе чланице Европске уније',
			['sr-latn'] = 'Države članice Evropske unije',
			uk = 'Країни-члени Європейського Союзу',
			['zh-hans'] = '欧洲联盟成员国',
			['zh-hant'] = '歐洲聯盟成員國',
		},
		omr = {
			default = 'Outermost regions',
			['be-tarask'] = 'Вонкавыя тэрыторыі',
			ca = 'Regions ultraperifèriques',
			cs = 'Nejvzdálenější regiony',
			de = 'Gebiete in äußerster Randlage',
			bn = 'দূরতম অঞ্চল',
			en = 'Outermost regions',
			es = 'Regiones ultraperiféricas',
			fr = 'Régions ultrapériphériques',
			ml = 'ഏറ്റവും പുറത്തുള്ള പ്രദേശങ്ങൾ',
			nb = 'Perifere regioner',
			nl = 'Ultraperifere gebieden',
			nn = 'Perifere regionar',
			no = 'Perifere regioner',
			sl = 'Najbolj oddaljene regije',
			sr = 'Спољашњи региони',
			['sr-latn'] = 'Spoljašnji regioni',
			['zh-hans'] = '外围区域',
			['zh-hant'] = '外圍區域',
		},
		inc = {
			default = 'Included territories with special status',
			['be-tarask'] = 'Уключаныя тэрыторыі з асаблівым статусам',
			bn = 'বিশেষ মর্যাদাযুক্ত অন্তর্ভুক্ত অঞ্চল',
			ca = 'Territoris amb estatus especial inclosos',
			cs = 'Území členských států se speciálním statusem',
			de = 'Eingeschlossene Gebiete mit Sonderstatus',
			en = 'Included territories with special status',
			es = 'Territorios con estatus especial incluidos',
			fr = 'Territoires inclus avec statut particulier',
			ml = 'പ്രത്യേക പദവിയോടെ ഉൾപ്പെടുത്തിയ പ്രദേശങ്ങൾ',
			nb = 'Inkluderte territorier med særlig status',
			nl = 'Opgenomen gebieden met speciale status',
			nn = 'Inkluderte territorium med særleg status',
			no = 'Inkluderte territorier med særlig status',
			sl = 'Vključena ozemlja s posebnim statusom',
			sr = 'Укључене територије са специјалним статусом',
			['sr-latn'] = 'Uključene teritorije sa specijalnim statusom',
			['zh-hans'] = '具有特殊状态的包含领土',
			['zh-hant'] = '具有特別狀態的包含領土',
		},
		oct = {
			default = 'Overseas countries and territories',
			['be-tarask'] = 'Заморскія краіны і тэрыторыі',
			bn = 'বিদেশের দেশ এবং অঞ্চল',
			ca = "Països i territoris d'ultramar",
			cs = 'Zámořské země a území',
			de = 'Überseeische Länder und Hoheitsgebiete',
			en = 'Overseas countries and territories',
			es = 'Países y territorios de ultramar',
			fr = 'Pays et territoires d’outre-mer',
			ml = 'വിദൂര രാജ്യങ്ങളും പ്രദേശങ്ങളും',
			nb = 'Fjerntliggende land og territorier',
			nl = 'Landen en gebieden overzee',
			nn = 'Fjerntliggjande land og territorium',
			no = 'Fjerntliggende land og territorier',
			sl = 'Čezmorske države in ozemlja',
			sr = 'Прекоморске земље и територије',
			['sr-latn'] = 'Prekomorske zemlje i teritorije',
			['zh-hans'] = '海外国家和领土',
			['zh-hant'] = '海外國家與領土',
		},
		exc = {
			default = 'Excluded territories by special provision',
			['be-tarask'] = 'Тэрыторыі, выключаныя адмысловым указаньнем',
			bn = 'বিশেষ বিধান দ্বারা বাদ দেওয়া অঞ্চলগুলি',
			ca = 'Territoris exclosos per clàusula especial',
			cs = 'Území pod správou členských států',
			de = 'Ausgeschlossene Gebiete durch besondere Bestimmung',
			en = 'Excluded territories by special provision',
			es = 'Territorios excluidos por cláusula especial',
			fr = 'Territoires exclus par clause particulière',
			ml = 'പ്രത്യേക വ്യവസ്ഥ പ്രകാരം ഒഴിവാക്കിയ പ്രദേശങ്ങൾ',
			nb = 'Ekskluderte territorier ved særlig bestemmelse',
			nl = 'Uitgesloten gebieden door speciale bepaling',
			nn = 'Ekskluderte territorium ved særleg bestemming',
			no = 'Ekskluderte territorier ved særlig bestemmelse',
			sl = 'Izključena ozemlja po posebni določbi',
			sr = 'Искључене територије специјалном провизијом',
			['sr-latn'] = 'Isključene teritorije specijalnom provizijom',
			['zh-hans'] = '基于特殊规定排除的领土',
			['zh-hant'] = '基於特別規定排除的領土',
		},
		candidate = {
			default = 'Candidate countries',
			['be-tarask'] = 'Краіны-кандыдаткі',
			bn = 'প্রার্থী দেশসমূহ',
			ca = 'Països candidats',
			cs = 'Kandidátské země',
			de = 'Kandidatenländer',
			en = 'Candidate countries',
			es = 'Países candidatos',
			fr = 'Pays candidats',
			ml = 'അംഗമാകാൻ ആഗ്രഹിക്കുന്ന രാജ്യങ്ങൾ',
			nb = 'Kandidatland',
			nl = 'Kandidaat-landen',
			nn = 'Kandidatland',
			no = 'Kandidatland',
			sl = 'Države kandidatke',
			sr = 'Државе кандидати',
			['sr-latn'] = 'Države kandidati',
			['zh-hans'] = '候选国家',
			['zh-hant'] = '候選國家',
		},
		former = {
			default = 'Former member countries or territories',
			['be-tarask'] = 'Колішнія краіны ці рэгіёны-чальцы',
			bn = 'প্রাক্তন সদস্য দেশ বা অঞ্চল',
			ca = 'Antics països o territoris membres',
			cs = 'Bývalé členské státy a území',
			de = 'Ehemalige Mitgliedsländer oder Territorien',
			en = 'Former member countries or territories',
			es = 'Antiguos países o territorios miembros',
			fr = 'Anciens pays ou territoires membres',
			ml = 'മുമ്പ് അംഗമായിരുന്ന രാജ്യങ്ങളും പ്രദേശങ്ങളും',
			nb = 'Tidligere medlemsland eller territorier',
			nl = 'Voormalige lidstaten of gebieden',
			nn = 'Tidlegare medlemsland eller territorium',
			no = 'Tidligere medlemsland eller territorier',
			sl = 'Nekdanje članske države ali ozemlja',
			sr = 'Државе или територије бивше чланице',
			['sr-latn'] = 'Države ili teritorije bivše članice',
			['zh-hans'] = '前成员国或地区',
			['zh-hant'] = '前成員國或地區',
		},
	},
	pattern = {
		{	'<div lang="{lang}" dir="{dir}" class="catlinks"' ..
			' style="clear:none;margin:2px 0;padding:2px;font-size:88%;line-height:normal">',
				'mainlist',
				'omrlist',
				'inclist',
				'octlist',
				'exclist',
				'candidatelist',
				'formerlist',
		},
		{	'<em>{maintitle}{colon}</em>',
				{ 'maintitle', 'mainlist', },
		},
			'{mainlist}',
		{	'<br /> ',
				{ 'mainlist', 'omrlist', },
				{ 'mainlist', 'inclist', },
		},
		{	'<em>{omrtitle}{colon}</em>',
				{ 'omrtitle', 'omrlist', },
		},
			'{omrlist}',
		{	'<br /> ',
				{ 'omrlist', 'inclist', },
		},
		{	'<em>{inctitle}{colon}</em>',
				{ 'inctitle', 'inclist', },
		},
			'{inclist}',

		{	'<hr /> ',
				{ 'mainlist', 'octlist', },
				{ 'mainlist', 'exclist', },
				{ 'mainlist', 'candidatelist', },
				{ 'mainlist', 'formerlist', },
				{ 'omrlist', 'octlist', },
				{ 'omrlist', 'exclist', },
				{ 'omrlist', 'candidatelist', },
				{ 'omrlist', 'formerlist', },
				{ 'inclist', 'octlist', },
				{ 'inclist', 'exclist', },
				{ 'inclist', 'candidatelist', },
				{ 'inclist', 'formerlist', },
		},
		{	'<em>{octtitle}{colon}</em>',
				{ 'octtitle', 'octlist', },
		},
			'{octlist}',
		{	'<br /> ',
				{ 'octlist', 'exclist', },
				{ 'octlist', 'candidatelist', },
				{ 'octlist', 'formerlist', },
		},
		{	'<em>{exctitle}{colon}</em>',
				{ 'exctitle', 'exclist', },
		},
			'{exclist}',
		{	'<br /> ',
				{ 'exclist', 'candidatelist', },
				{ 'exclist', 'formerlist', },
		},
		{	'<em>{candidatetitle}{colon}</em>',
				{ 'candidatetitle', 'candidatelist', },
		},
			'{candidatelist}',
		{	'<br /> ',
				{ 'candidatelist', 'formerlist', },
		},
		{	'<em>{formertitle}{colon}</em>',
				{ 'formertitle', 'formerlist', },
		},
			'{formerlist}',
		{
			'</div>',
				'mainlist',
				'omrlist',
				'inclist',
				'octlist',
				'exclist',
				'candidatelist',
				'formerlist',
		},
	},
	lists = {
		-- List of countries in an order suitable for display in the specified language.
		main = {
			default     = 'automatic sorted',
			english     = 'automatic',
			automatic   = 'AT BE BG HR CY CZ DK EE FI FR DE EL HU IE IT LV LT LU MT NL PL PT RO SK SI ES SE',
			fr          = 'DE AT BE BG CY HR DK ES EE FI FR EL HU IE IT LV LT LU MT NL PL PT CZ RO SK SI SE',
			nb          = 'BE BG DK EE FI FR EL IE IT HR CY LV LT LU MT NL PL PT RO SK SI ES SE CZ DE HU AT',
			nn          = 'AT BE BG DK EE FI FR EL IE IT HR CY LV LT LU MT NL PL PT RO SK SI ES SE CZ DE HU',
			no          = 'BE BG DK EE FI FR EL IE IT HR CY LV LT LU MT NL PL PT RO SK SI ES SE CZ DE HU AT',
			['zh-hans'] = 'IE EE AT BE BG PL DK DE FR FI NL CZ HR LV LT LU RO MT PT SE CY SK SI ES EL HU IT',
			['zh-hant'] = 'IE EE AT BE BG PL DK DE FR FI NL CZ HR LV LT LU RO MT PT SE CY SK SI ES EL HU IT',
		},
		omr = {
			default     = 'automatic sorted',
			english     = 'automatic',
			automatic   = 'PT20 ESCN GF GP PT30 MQ YT RE MF',
			fr          = 'PT20 ESCN GP GF PT30 MQ YT RE MF',
			['zh-hans'] = 'GF MF GP ESCN RE PT30 MQ YT PT20',
			['zh-hant'] = 'GF MF GP ESCN RE PT30 MQ YT PT20',
		},
		inc = {
			default     = 'automatic sorted',
			english     = 'automatic',
			automatic   = 'AX DEXBU ITXCA ESCE DEXHE ITXLI ESML EL69 CYXUN',
			fr          = 'AX DEXBU ITXCA ESCE DEXHE CYXUN ITXLI ESML EL69',
			nb          = 'EL69 DEXBU ITXCA ESCE CYXUN DEXHE ITXLI ESML AX',
			nn          = 'EL69 DEXBU ITXCA ESCE CYXUN DEXHE ITXLI ESML AX',
			no          = 'EL69 DEXBU ITXCA ESCE CYXUN DEXHE ITXLI ESML AX',
			['zh-hans'] = 'EL69 AX DEXHE DEXBU ITXLI ESML CYXUN ESCE ITXCA',
			['zh-hant'] = 'EL69 AX DEXHE DEXBU ITXLI ESML CYXUN ESCE ITXCA',
		},
		oct = {
			default     = 'automatic sorted',
			english     = 'automatic',
			automatic   = 'AW BQ CP CW PF TF GL NC BL SX PM WF',
			fr          = 'AW CP CW GL NC BQ PF BL SX PM TF WF',
			['zh-hans'] = 'AW PF TF GL BQ SX CP CW BL PM WF NC',
			['zh-hant'] = 'AW PF TF GL CW BQ SX CP BL PM WF NC',
		},
		exc = {
			default     = 'automatic sorted',
			english     = 'automatic',
			automatic   = 'FO CYXNO',
			fr          = 'CYXNO FO',
			['zh-hans'] = 'CYXNO FO',
			['zh-hant'] = 'CYXNO FO',
		},
		candidate = {
			default     = 'automatic sorted',
			english     = 'automatic',
			automatic   = 'AL BA MD ME MK RS TR UA',
			fr          = 'AL BA MK MD ME RS TR UA',
			['zh-hans'] = 'AL MK BA ME MD RS TR UA',
			['zh-hant'] = 'AL MK BA MD ME RS TR UA',
		},
		former = {
			default       = 'automatic sorted',
			english       = 'automatic',
			automatic     = 'UKXSB DZ AI BM VG KY FK GI GG IM JE MS PN SH TC UK',
			fr            = 'UKXSB DZ AI BM KY GI GG JE FK IM MS PN SH TC UK VG',
			nb            = 'UKXSB DZ AI BM VG KY FK GI GG JE IM MS PN SH UK TC',
			nn            = 'UKXSB DZ AI BM VG KY FK GI GG JE IM MS PN SH UK TC',
			no            = 'UKXSB DZ AI BM VG KY FK GI GG JE IM MS PN SH UK TC',
			['zh-hans']   = 'DZ UKXSB AI BM FK GG KY IM MS PN SH TC UK VG JE GI',
			['zh-hant']   = 'DZ AI BM FK GG UKXSB KY IM MS PN SH TC UK VG JE GI',
		},
	},
	countries = {
		-- Codes are those used by the European union, most of them from ISO 3166-1, possibly extended by ISO 3166-2, or private-use extension
	--	AD    = { 'Andorra',                                      qid = 'Q228', },
		AI    = { 'Anguilla',                                     qid = 'Q25228', },
		AL    = { 'Albania',                                      qid = 'Q222', },
	--	AM    = { 'Armenia',                                      qid = 'Q399', },
		AT    = { 'Austria',                                      qid = 'Q40', },
		AW    = { 'Aruba',                                        qid = 'Q21203', },
		AX    = { 'Åland',
		          'Åland Islands',                                qid = 'Q5689', },
	--	AZ    = { 'Azerbaijan',                                   qid = 'Q227', },
	--	AZXAR = { 'Republic of Artsakh',
	--	          'Nagorno-Karabakh',
	--	          'Artsakh',                                      qid = 'Q244165', },
		BA    = { 'Bosnia and Herzegovina',                       qid = 'Q225', },
		BE    = { 'Belgium',                                      qid = 'Q31', },
		BG    = { 'Bulgaria',                                     qid = 'Q219', },
		BL    = { 'Saint-Barthélemy‎ ',                            qid = 'Q25362', },
		BM    = { 'Bermuda',                                      qid = 'Q23635', },
		BQ    = { 'Caribbean Netherlands',                        qid = 'Q27561', the = true, },
	--	BY    = { 'Belarus',                                      qid = 'Q184', },
	--	CH    = { 'Switzerland',                                  qid = 'Q39', },
		CP    = { 'Clipperton Island',                            qid = 'Q161258', },
		CW    = { 'Curaçao',                                      qid = 'Q25279', },
		CY    = { 'Cyprus',                                       qid = 'Q229', },
		CYXNO = { 'Northern Cyprus',                              qid = 'Q23681', },
		CYXUN = { 'UN Buffer Zone in Cyprus',                     qid = 'Q116970', the = true, },
		CZ    = { 'Czech Republic',
		          'Czechia',
		          'Česko',                                        qid = 'Q213', the = true, },
		DE    = { 'Germany',                                      qid = 'Q183', },
		DEXBU = { 'Büsingen am Hochrhein',                        qid = 'Q61698', },
		DEXHE = { 'Heligoland',                                   qid = 'Q3038', },
		DK    = { 'Denmark',                                      qid = 'Q35', },
		DZ    = { 'Algeria',                                      qid = 'Q262', },
		EE    = { 'Estonia',                                      qid = 'Q191', },
		EL    = { 'Greece',                                       qid = 'Q41', }, --[[Note: the European Union uses code 'EL' instead of 'GR' for Greece]]
		EL69  = { 'Mount Athos',                                  qid = 'Q130321', }, --[[Note: idem]]
		ES    = { 'Spain',                                        qid = 'Q29', },
		ESCE  = { 'Ceuta',                                        qid = 'Q5823', },
		ESCN  = { 'Canary Islands',                               qid = 'Q5813', the = true, },
		ESML  = { 'Melilla',                                      qid = 'Q5831', },
		FI    = { 'Finland',                                      qid = 'Q33', },
		FK    = { 'Falkland Islands',                             qid = 'Q9648', the = true, },
		FO    = { 'Faroe Islands',                                qid = 'Q4628', the = true, },
		FR    = { 'France',                                       qid = 'Q142', },
	--	GE    = { 'Georgia',
	--	          'Georgia (country)',
	--	          'საქართველო',                                   qid = 'Q230', },
	--	GEXAB = { 'Abkhazia',                                     qid = 'Q23334', },
	--	GEXSO = { 'South Ossetia',                                qid = 'Q23427', },
		GF    = { 'French Guiana',
		          'Guyane',
		          'Guyane française',                             qid = 'Q3769', },
		GG    = { 'Guernsey',                                     qid = 'Q25230', }, --[[Note: does not really "Brexit", was already specially excluded, but no longer associated with UK into the EU]]
		GI    = { 'Gibraltar',                                    qid = 'Q1410', },
		GL    = { 'Greenland',                                    qid = 'Q223', },
		GP    = { 'Guadeloupe',                                   qid = 'Q17012', },
		HR    = { 'Croatia',                                      qid = 'Q224', },
		HU    = { 'Hungary',                                      qid = 'Q28', },
		IE    = { 'Republic of Ireland',
		          'Ireland',
		          'Ireland - Éire',                               qid = 'Q27', the = true, },
		IM    = { 'Isle of Man',                                  qid = 'Q9676', the = true, }, --[[Note: does not really "Brexit", was already specially excluded, but no longer associated with UK into the EU]]
	--	IS    = { 'Iceland',                                      qid = 'Q189', },
		IT    = { 'Italy',                                        qid = 'Q38', },
		ITXCA = { "Campione d'Italia",                            qid = 'Q244207', },
		ITXLI = { 'Livigno',                                      qid = 'Q40871', },
		JE    = { 'Jersey',
		          'Bailiwick of Jersey',                          qid = 'Q785', }, --[[Note: does not really "Brexit", was already specially excluded, but no longer associated with UK into the EU]]
		KY    = { 'Cayman Islands',                               qid = 'Q5785', },
	--	LI    = { 'Liechtenstein',                                qid = 'Q347', },
		LT    = { 'Lithuania',                                    qid = 'Q37', },
		LU    = { 'Luxembourg',                                   qid = 'Q32', },
		LV    = { 'Latvia',                                       qid = 'Q211', },
	--	MC    = { 'Monaco',                                       qid = 'Q235', },
		MD    = { 'Moldova',                                      qid = 'Q217', },
	--	MDSN  = { 'Transnistria',                                 qid = 'Q907112', },
		ME    = { 'Montenegro',                                   qid = 'Q236', },
		MF    = { 'Saint-Martin (France)',
		          'Saint Martin (France)',                        qid = 'Q126125', note = '<kbd style="font-size:smaller">(FR)</kbd>', },
		MK    = { 'North Macedonia',
		          'Republic of Macedonia',
		          'Former Yugoslav Republic of Macedonia',        qid = 'Q221' },
		MQ    = { 'Martinique',                                   qid = 'Q17054', },
		MS    = { 'Montserrat',                                   qid = 'Q13353', },
		MT    = { 'Malta',                                        qid = 'Q233', },
		NC    = { 'New Caledonia',                                qid = 'Q33788', },
		NL    = { 'Netherlands',                                  qid = 'Q55', the = true, },
	--	NO    = { 'Norway',                                       qid = 'Q20', },
		PF    = { 'French Polynesia',                             qid = 'Q30971', },
		PL    = { 'Poland',                                       qid = 'Q36', },
		PM    = { 'Saint-Pierre and Miquelon',
		          'Saint-Pierre-et-Miquelon',                     qid = 'Q34617', },
		PN    = { 'Pitcairn Islands',                             qid = 'Q35672', the = true, },
		PT    = { 'Portugal',                                     qid = 'Q45', },
		PT30  = { 'Madeira',                                      qid = 'Q26253', },
		PT20  = { 'Azores',                                       qid = 'Q25263', the = true, },
		RE    = { 'Réunion',                                      qid = 'Q17070', },
		RO    = { 'Romania',                                      qid = 'Q218', },
		RS    = { 'Serbia',                                       qid = 'Q403', },
	--	RSKM  = { 'Kosovo',                                       qid = 'Q1246', },
	--	RU    = { 'Russia',                                       qid = 'Q159', },
		SE    = { 'Sweden',                                       qid = 'Q34', },
		SH    = { 'Saint Helena, Ascension and Tristan da Cunha',
		          'Saint Helena',                                 qid = 'Q192184', },
		SI    = { 'Slovenia',                                     qid = 'Q215', },
		SK    = { 'Slovakia',                                     qid = 'Q214', },
	--	SM    = { 'San Marino',                                   qid = 'Q238', },
		SX    = { 'Sint Maarten, Dutch Caribbean',
		          'Sint Maarten',                                 qid = 'Q26273', note = '<kbd style="font-size:smaller">(NL)</kbd>', },
		TC    = { 'Turks and Caicos Islands',                     qid = 'Q18221', the = true, },
		TF    = { 'French Southern and Antarctic Lands‎',
		          'Terres australes et antarctiques françaises‎',  qid = 'Q129003', the = true, },
		TR    = { 'Turkey',                                       qid = 'Q43', },
		UA    = { 'Ukraine',                                      qid = 'Q212', },
		UK    = { 'United Kingdom',                               qid = 'Q145', the = true, }, --[[Note: the European Union used code 'UK' instead of 'GB' for the United Kingdom]]
		UKXSB = { 'Akrotiri and Dhekelia',                        qid = 'Q37362', }, --[[Note: idem; does "Brexit", but natives keep their European right from Cyprus]]
	--	VA    = { 'Vatican City',
	--	          'Vatican City State',
	--	          'Holy See',                                     qid = 'Q237', },
		VG    = { 'British Virgin Islands',                       qid = 'Q25305', the = true, },
		WF    = { 'Wallis and Futuna',
		          'Wallis-et-Futuna',                             qid = 'Q35555', },
		YT    = { 'Mayotte',                                      qid = 'Q17063', },
	},
}