Module:Countries/South America/sandbox

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|South America}}.

--[=[ 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.
		XYZ must consist of en alphabetic characters [A-Za-z].
]=]
return {
	titles = {
		main = {
			default = 'Countries of South America',
			af = 'Lande van Suid-Amerika',
			am = 'የደቡብ አሜሪካ አገሮች',
			ar = 'دول أمريكا الجنوبية',
			az = 'Şimali Amerika ölkələri',
			-- azb = '',
			be = 'Краіны Паўднёвай Амэрыкі',
			['be-tarask'] = 'Краіны Паўднёвай Амэрыкі',
			bg = 'Страни от Южна Америка',
			bn = 'দক্ষিণ আমেরিকার দেশসমূহ',
			-- bo = '',
			-- br = '',
			bs = 'Zemlje Južne Amerike',
			ca = 'Països d’Amèrica del Sud',
			ceb = 'Mga nasud sa South America',
			co = 'Paesi di l’America Meridionale',
			cs = 'Státy Jižní Ameriky',
			cy = 'Gwledydd De America',
			da = 'Lande i Sydamerika',
			de = 'Staaten in Südamerika',
			el = 'Χώρες της Νότιας Αμερικής',
			en = 'Countries of South America',
			eo = 'Landoj de Sudameriko',
			es = 'Países de América del Sur',
			et = 'Lõuna-Ameerika riigid',
			eu = 'Hego Amerikako herrialdeak',
			fa = 'کشورهای آمریکای جنوبی',
			fi = 'Etelä-Amerikan maat',
			fr = 'Pays d’Amérique du Sud',
			fy = 'Lannen fan Súd-Amearika',
			ga = 'Tíortha Mheiriceá Theas',
			gd = 'Dùthchannan Ameireaga a Deas',
			gl = 'Países de América do Sur',
			-- gsw = '',
			gu = 'દક્ષિણ અમેરિકાના દેશો',
			ha = 'Kasashen Kudancin Amurka',
			haw = 'Nā Aupuni o ʻAmelika Hema',
			he = 'מדינות דרום אמריקה',
			hi = 'दक्षिण अमेरिका के देश',
			hmn = 'Lub tebchaws ntawm South America',
			hr = 'Zemlje Južne Amerike',
			ht = 'Peyi nan Amerik di Sid',
			hu = 'Dél-Amerika országai',
			hy = 'Հարավային Ամերիկայի երկրներ',
			id = 'Negara-negara Amerika Selatan',
			ig = 'Mba nke South America',
			is = 'Lönd Suður-Ameríku',
			it = 'Paesi del Sud America',
			ja = '南アメリカの国々',
			jv = 'Negara-negara Amerika Selatan',
			ka = 'სამხრეთ ამერიკის ქვეყნები',
			kk = 'Оңтүстік Америка елдері',
			km = 'បណ្តាប្រទេសនៃអាមេរិកខាងត្បូង',
			kn = 'ದಕ್ಷಿಣ ಅಮೆರಿಕದ ದೇಶಗಳು',
			ko = '북미 국가',
			ku = 'Welatên Amerîkaya Başûr',
			ky = 'Түштүк Америка өлкөлөрү',
			la = 'Nationes ex Americae Meridionalis',
			lb = 'Länner aus Südamerika',
			lo = 'ປະເທດຂອງອາເມລິກາໃຕ້',
			lt = 'Pietų Amerikos šalys',
			lv = 'Dienvidamerikas valstis',
			mg = 'Firenena any Amerika Atsimo',
			mi = 'Nga whenua o Amerika ki te Tonga',
			mk = 'Земји во Јужна Америка',
			ml = 'ദക്ഷിണ അമേരിക്കയിലെ രാജ്യങ്ങൾ',
			mm = 'တောင်အမေရိကနိုင်ငံများ',
			mn = 'Өмнөд Америкийн орнууд',
			mr = 'दक्षिण अमेरिकेतील देश',
			ms = 'Negara-negara Amerika Selatan',
			mt = 'Pajjiżi ta ’l-Amerika t’Isfel',
			nb = 'Land i Sør-Amerika',
			ne = 'दक्षिण अमेरिका को देशहरु',
			nl = 'Landen van Zuid-Amerika',
			nn = 'Land i Sør-Amerika',
			no = 'Land i Sør-Amerika',
			ny = 'Mayiko aku South America',
			-- oc = '',
			['or'] = 'ଦକ୍ଷିଣ ଆମେରିକାର ଦେଶଗୁଡିକ',
			-- os = '',
			pa = 'ਦੱਖਣੀ ਅਮਰੀਕਾ ਦੇ ਦੇਸ਼',
			pl = 'Kraje Ameryki Południowej',
			ps = 'د سویلي امریکا هیوادونه',
			pt = 'Países da América do Sul',
			ro = 'Țările din America de Sud',
			ru = 'Страны Южной Америки',
			rw = 'Ibihugu byo muri Amerika yepfo',
			-- sa = '',
			sd = 'ڏکڻ آمريڪا جا ملڪ',
			sh = 'Države u Južnoj Americi',
			si = 'දකුණු ඇමරිකාවේ රටවල්',
			sk = 'Krajiny Južnej Ameriky',
			sl = 'Države Južne Amerike',
			sm = 'Atunuʻu o Amerika i Saute',
			sn = 'Nyika dzeSouth America',
			so = 'Wadamada Koonfurta Ameerika',
			sr = 'Државе у Јужној Америци',
			['sr-latn'] = 'Države u Južnoj Americi',
			st = 'Linaha tsa Amerika Boroa',
			su = 'Nagara Amérika Kidul',
			sv = 'Länder i Sydamerika',
			sw = 'Nchi za Amerika Kusini',
			ta = 'தென் அமெரிக்காவின் நாடுகள்',
			te = 'దక్షిణ అమెరికా దేశాలు',
			tg = 'Кишварҳои Амрикои Ҷанубӣ',
			th = 'ประเทศในอเมริกาใต้',
			tk = 'Günorta Amerikanyň ýurtlary',
			tl = 'Mga Bansa ng Timog Amerika',
			tr = 'Güney Amerika Ülkeleri',
			tt = 'Көньяк Америка илләре',
			ug = 'جەنۇبىي ئامېرىكا دۆلەتلىرى',
			uk = 'Країни Південної Америки',
			ur = 'جنوبی امریکہ کے ممالک',
			uz = 'Janubiy Amerika mamlakatlari',
			vi = 'Các nước Nam Mỹ',
			xh = 'Amazwe akuMzantsi Merika',
			yi = 'לענדער פון דרום אַמעריקע',
			yo = 'Awọn orilẹ -ede ti South America',
			['zh-hans'] = '南美洲国家',
			['zh-hant'] = '南美洲國家',
			zu = 'Amazwe aseNingizimu Melika',
		},
		other = {
			default = 'Other territories',
			af = 'Ander gebiede',
			am = 'ሌሎች ግዛቶች',
			ar = 'مناطق أخرى',
			az = 'Digər ərazilər',
			-- azb = '',
			be = 'Іншыя тэрыторыі',
			['be-tarask'] = 'Іншыя тэрыторыі',
			bg = 'Други територии',
			bn = 'অন্যান্য অঞ্চল',
			-- bo = '',
			-- br = '',
			bs = 'Ostala područja',
			ca = 'Altres territoris',
			ceb = 'Ubang mga dapit',
			co = 'Altri territori',
			cs = 'Ostatní oblasti',
			cy = 'Tiriogaethau eraill',
			da = 'Andre territorier',
			de = 'Weitere Gebiete',
			el = 'Άλλα εδάφη',
			en = 'Other territories',
			eo = 'Aliaj teritorioj',
			es = 'Otros territorios',
			et = 'Muud territooriumid',
			eu = 'Beste lurralde batzuk',
			fa = 'سرزمین های دیگر',
			fi = 'Muut alueet',
			fr = 'Autres territoires',
			fy = 'Oare gebieten',
			ga = 'Críocha eile',
			gd = 'Fearainn eile',
			gl = 'Outros territorios',
			-- gsw = '',
			gu = 'અન્ય પ્રદેશો',
			ha = 'Sauran yankuna',
			haw = 'Nā’āina’ē aʻe',
			he = 'טריטוריות אחרות',
			hi = 'अन्य प्रदेश',
			hmn = 'Lwm thaj',
			hr = 'Ostala područja',
			ht = 'Lòt teritwa',
			hu = 'Más területek',
			hy = 'Այլ տարածքներ',
			id = 'Wilayah lain',
			ig = 'Ógbè ndị ọzọ',
			is = 'Önnur svæði',
			it = 'Altri territori',
			ja = 'その他の地域',
			jv = 'Tlatah liyane',
			ka = 'სხვა ტერიტორიები',
			kk = 'Басқа аумақтар',
			km = 'ដែនដីផ្សេងទៀត',
			kn = 'ಇತರ ಪ್ರದೇಶಗಳು',
			ko = '기타 지역',
			ku = 'Herêmên din',
			ky = 'Башка аймактар',
			la = 'Alii fines',
			lb = 'Aner Territoiren',
			lo = 'ອານາເຂດອື່ນໆ',
			lt = 'Kitos teritorijos',
			lv = 'Citas teritorijas',
			mg = 'Faritra hafa',
			mi = 'Ētahi atu rohe',
			mk = 'Други подрачја',
			ml = 'മറ്റ് ഭൂപ്രദേശങ്ങൾ',
			mm = 'အခွားသောနယ်မြေများတွင်',
			mn = 'Бусад нутаг дэвсгэрүүд',
			mr = 'इतर प्रांत',
			ms = 'Wilayah lain',
			mt = 'Territorji oħra',
			nb = 'Andre territorier',
			ne = 'अन्य क्षेत्रहरू',
			nl = 'Andere gebieden',
			nn = 'Andre territorium',
			no = 'Andre territorier',
			ny = 'Madera ena',
			-- oc = '',
			['or'] = 'ଅନ୍ୟାନ୍ୟ ଅଞ୍ଚଳ',
			-- os = '',
			pa = 'ਹੋਰ ਇਲਾਕਿਆਂ',
			pl = 'Inne terytoria',
			ps = 'نورې سیمې',
			pt = 'Outros territórios',
			ro = 'Alte teritorii',
			ru = 'Другие территории',
			rw = 'Utundi turere',
			-- sa = '',
			sd = 'ٻين علائقن ۾',
			sh = 'Druge teritorije',
			si = 'වෙනත් ප්රදේශ',
			sk = 'Ostatné územia',
			sl = 'Druga ozemlja',
			sm = 'Isi teritori',
			sn = 'Dzimwe ndima',
			so = 'Goobaha kale',
			sr = 'Друге територије',
			['sr-latn'] = 'Druge teritorije',
			st = 'Libaka tse ling',
			su = 'Wewengkon séjén',
			sv = 'Övriga territorier',
			sw = 'Sehemu nyingine',
			ta = 'மற்ற பிரதேசங்கள்',
			te = 'ఇతర భూభాగాలు',
			tg = 'Дигар минтақаҳо',
			th = 'ดินแดนอื่น ๆ',
			tk = 'Beýleki sebitler',
			tl = 'Iba pang mga teritoryo',
			tr = 'Diğer bölgeler',
			tt = 'Башка территорияләр',
			ug = 'باشقا رايونلار',
			uk = 'Інші території',
			ur = 'دیگر علاقوں',
			uz = 'Boshqa hududlar',
			vi = 'Các lãnh thổ khác',
			xh = 'Ezinye iindawo',
			yi = 'אנדערע טעריטאָריע',
			yo = 'Awọn agbegbe miiran',
			['zh-hans'] = '其他地区',
			['zh-hant'] = '其他地區',
			zu = 'Ezinye izindawo',
		},
		partly  = {
			default = 'partly located in South America',
			af = 'deels geleë in Suid-Amerika',
			am = 'በከፊል በደቡብ አሜሪካ ውስጥ በሚገኘው',
			ar = 'تقع جزئيا في أمريكا الجنوبية',
			az = 'qismən Cənubi Amerikada yerləşir',
			-- azb = '',
			be = 'часткова размешчаны ў Паўднёвай Амерыцы',
			['be-tarask'] = 'часткова размешчаны ў Паўднёвай Амерыцы',
			bg = 'частично се намира в Южна Америка',
			bn = 'আংশিকভাবে দক্ষিণ আমেরিকায় অবস্থিত',
			-- bo = '',
			-- br = '',
			bs = 'djelomično se nalazi u Južnoj Americi',
			ca = 'parcialment situat a Amèrica del Sud',
			ceb = 'bahin nga nahamutang sa Habagatang Amerika',
			co = 'in parte situatu in l’America di u Sud',
			cs = 'částečně se nachází v Jižní Americe',
			cy = 'wedi’i leoli’n rhannol yn Ne America',
			da = 'delvist beliggende i Sydamerika',
			de = 'teilweise in Südamerika gelegen',
			el = 'που βρίσκεται εν μέρει στη Νότια Αμερική',
			en = 'partly located in South America',
			eo = 'parte situanta en Sudameriko',
			es = 'parcialmente ubicado en América del Sur',
			et = 'osaliselt asub Lõuna-Ameerikas',
			eu = 'neurri batean Hego Amerikan dago',
			fa = 'تا حدی در آمریکای جنوبی واقع شده است',
			fi = 'osittain Etelä-Amerikassa',
			fr = 'situé partiellement en Amérique du Sud',
			fy = 'foar in diel lizze yn Súd-Amearika',
			ga = 'lonnaithe go páirteach i Meiriceá Theas',
			gd = 'pàirt ann an Ameireaga a Deas',
			gl = 'situado en parte en América do Sur',
			-- gsw = '',
			gu = 'આંશિક રીતે દક્ષિણ અમેરિકામાં સ્થિત છે',
			ha = 'yanki a yankin Kudancin Amirka',
			haw = 'ma kekahi hapa maʻAmelika Hema',
			he = 'ממוקם בחלקו בדרום אמריקה',
			hi = 'आंशिक रूप से दक्षिण अमेरिका में स्थित है',	
			hmn = 'ib nrab nyob hauv America Qab Teb',
			hr = 'dijelom se nalazi u Južnoj Americi',
			ht = 'an pati sitiye nan Amerik di Sid',
			hu = 'részben Dél-Amerikában található',
			hy = 'մասամբ գտնվում է Հարավային Ամերիկայում',
			id = 'sebagian berlokasi di Amerika Selatan',
			ig = 'nke dị n’akụkụ ụfọdụ na America Ugwu',
			is = 'að hluta til staðsett í Suður-Ameríku',
			it = 'in parte situato nel Sud America',
			ja = '一部南米にあります',
			jv = 'sebagéyan dumunung ing Amérika Selatan',
			ka = 'ნაწილობრივ მდებარეობს სამხრეთ ამერიკაში',
			kk = 'ішінара Оңтүстік Америкада орналасқан',
			km = 'មានទីតាំងស្ថិតនៅផ្នែកខ្លះនៃអាមេរិកខាងត្បូង',
			kn = 'ಭಾಗಶಃ ದಕ್ಷಿಣ ಅಮೆರಿಕಾದಲ್ಲಿ ಇದೆ',
			ko = '부분적으로 남아메리카에 위치',
			ku = 'bi qismî li Amerîkayê Başûrê de ye',
			ky = 'жарым-жартылай Түштүк Америкада жайгашкан',
			la = 'partim sita in Americae Meridionalis',
			lb = 'deelweis zu Südamerika',
			lo = 'ສ່ວນຫນຶ່ງແມ່ນຢູ່ໃນອາເມລິກາໃຕ້',
			lt = 'iš dalies įsikūręs Pietų Amerikoje',
			lv = 'daļēji atrodas Dienvidamerikā',
			mg = 'ampahany any Amerika Atsimo',
			mi = 'wāhanga kei roto i Amerika ki te Tonga',
			mk = 'делумно лоцирана во Јужна Америка',
			ml = 'ഭാഗികമായി തെക്കേ അമേരിക്കയിൽ സ്ഥിതിചെയ്യുന്നു',
			mm = 'တစ်စိတ်တစ်ပိုင်းတောင်အမေရိကမှာတည်ရှိပါတယ်',
			mn = 'хэсэгчлэн байршдаг Өмнөд Америкт',
			mr = 'अंशतः स्थित दक्षिण अमेरिका मध्ये',
			ms = 'sebahagiannya terletak di Amerika Selatan',
			mt = 'parzjalment lokalizzat fl-Amerika t’Isfel',
			nb = 'delvis lokalisert i Sør-Amerika',
			ne = 'आंशिक रूप मा दक्षिण अमेरिका मा स्थित छ',
			nl = 'gedeeltelijk gelegen in Zuid-Amerika',
			nn = 'delvis lokalisert i Sør-Amerika',
			no = 'delvis lokalisert i Sør-Amerika',
			ny = 'pang’ono mu Kumwera kwa Amerika',
			-- oc = '',
			['or'] = 'ଆଂଶିକ ଦକ୍ଷିଣ ଆମେରିକାରେ ଅବସ୍ଥିତ',
			-- os = '',
			pa = 'ਕੁਝ ਹੱਦ ਤਕ ਦੱਖਣੀ ਅਮਰੀਕਾ ਵਿੱਚ ਸਥਿਤ',
			pl = 'częściowo znajduje się w Ameryce Południowej',
			ps = 'یوه برخه په سویلي امریکا کې موقعیت لري',
			pt = 'parcialmente localizado na América do Sul',
			ro = 'parțial situat în America de Sud',
			ru = 'частично расположен в Южной Америке',
			rw = 'igice giherereye muri Amerika yepfo',
			-- sa = '',
			sd = 'جزوي طور ڏکڻ آمريڪا ۾ واقع آهي',
			sh = 'delimično smeštene u Južnoj Americi',
			si = 'අර්ධ වශයෙන් දකුණු ඇමරිකාවේ පිහිටා ඇත',
			sk = 'čiastočne sa nachádza v Južnej Amerike',
			sl = 'delno v Južni Ameriki',
			sm = 'o se vaega o loʻo i Amerika i Saute',
			sn = 'chikamu chinowanikwa kuSouth America',
			so = 'qayb ahaan ku taal Koonfurta Ameerika',
			sr = 'делимично се налази у Јужној Америци',
			['sr-latn'] = 'delimično se nalazi u Južnoj Americi',
			st = 'karolo e ’ngoe e le Amerika Boroa',
			su = 'sawaréh lokasina di Amérika Kidul',
			sv = 'delvis belägen i Sydamerika',
			sw = 'sehemu kupata ndani Amerika Kusini',
			ta = 'ஓரளவு தென் அமெரிக்காவில் அமைந்துள்ளது',
			te = 'పాక్షికంగా దక్షిణ అమెరికాలో ఉంది',
			tg = 'қисман дар Амрикои Ҷанубӣ ҷойгир аст',
			th = 'ตั้งอยู่บางส่วนในทวีปอเมริกาใต้',
			tk = 'bölekleýin Günorta Amerikada ýerleşýär',
			tl = 'bahagyang matatagpuan sa Timog Amerika',
			tr = 'kısmen Güney Amerika’da bulunan',
			tt = 'өлешчә Көньяк Америкада урнашкан',
			ug = 'قىسمەن جەنۇبى ئامېرىكىغا جايلاشقان',
			uk = 'частково розташований у Південній Америці',
			ur = 'جزوی طور پر جنوبی امریکہ میں واقع ہے',
			uz = 'qisman Janubiy Amerikada joylashgan',
			vi = 'một phần nằm ở Nam Mỹ',
			xh = 'inxenye ikhona ekhaya eMzantsi Melika',
			yi = 'טייל ליגן אין דרום אַמעריקע',
			yo = 'ni apakan o wa ni Gusu Amẹrika',
			['zh-hans'] = '部分位于南美洲',
			['zh-hant'] = '部分位於南美洲',
			zu = 'ingxenye eyatholakala eNingizimu Melika',
		}
	},
	pattern = {
		{	'<div lang="{lang}" dir="{dir}" class="catlinks"' ..
			' style="clear:none;margin:2px 0;padding:2px;font-size:88%;line-height:normal">',
				'mainlist',
				'otherlist',
		},
		{	'<em>{maintitle}{colon}</em>',
				{ 'maintitle', 'mainlist', },
		},
			'{mainlist}',
		{	'<br /> ',
				{ 'mainlist', 'otherlist', },
		},
		{	'<em>{othertitle}{colon}</em>',
				{ 'othertitle', 'otherlist', },
		},
			'{otherlist}',
		{	'<br /> <small style="font-size:88%"><sup>‡</sup></small>{colon}<em>{partlytitle}</em>',
				{ 'partlytitle', 'partlylist', },
		},
		{	'</div>',
				'mainlist',
				'otherlist',
		},
	},
	simple = {
		pattern = {
			{	'<div lang="{lang}" dir="{dir}" class="catlinks"' ..
				' style="clear:none;margin:2px 0;padding:2px;font-size:88%;line-height:normal">',
					'mainlist',
			},
			{	'<em>{maintitle}{colon}</em>',
					{ 'maintitle', 'mainlist', },
			},
				'{mainlist}',
			{	'<br /> <small style="font-size:88%"><sup>‡</sup></small>{colon}<em>{partlytitle}</em>',
					{ 'partlytitle', 'partlylist', },
			},
			{	'</div>',
					'mainlist',
			},
		},
		sections = {
			-- List of sections to be displayed if simple=yes.
			-- Each value is a table identifying any additional country codes that
			-- are listed in that section only if simple=yes.
			main = {
				AW = true,
				BQBO = true,
				CW = true,
				FK = true,
				GF = true,
				GS = true,
			},
		},
	},
	lists = {
		-- List of countries in an order suitable for display in the specified language.
		-- Country/territories keys must be on only one of the lists below. Exceptions are those added to the main list only if simple=yes (see above)
		main = {
			default     = 'automatic sorted',  -- currently unused because en is defined
			en          = 'automatic sorted',  -- this applies with uselang=XX where XX is not defined here
			english     = 'automatic',  -- this applies with uselang=en
			automatic   = 'AR BO BR CL CO EC GY PY PE SR TT UY VE',
			['zh-hans'] = 'AR PY BR PE BO EC CO GY SR TT UY VE CL',
			['zh-hant'] = 'AR PY BR PE BO EC CO GY TT SR UY VE CL',
		},
		other = {
			default     = 'automatic sorted',
			en          = 'automatic sorted',
			english     = 'automatic',
			automatic   = 'AW BQBO CW FK GF GS',
			['zh-hans'] = 'AW BQBO GF FK CW GS',
			['zh-hant'] = 'AW BQBO GF FK CW GS',
		},
		partly = {
			-- Not rendered as a list, conditionally rendered as a footer note
			-- (marked by '‡' after each country, see pattern).
			-- So no need to sort the list for each language, just ordered by code here
			default = 'automatic',
			automatic = 'TT',
		},
	},
	countries = {
		-- Keys are arbitrarily capital codes from ISO3166-1 (2 letters), possibly extended by ISO3166-2, or longer codes for specific areas.
		-- They must match the codes used locally in the above lists, but they have no other implied meaning outside this module.
		AR   = { 'Argentina',               qid = 'Q414', },
		AW   = { 'Aruba',                   qid = 'Q21203', },
		BO   = { 'Bolivia',                 qid = 'Q750', },
		BQBO = { 'Bonaire',                 qid = 'Q25396', },
		BR   = { 'Brazil',                  qid = 'Q155', },
		CL   = { 'Chile',                   qid = 'Q298', },
		CO   = { 'Colombia',                qid = 'Q739', },
		CW   = { 'Curaçao',                 qid = 'Q25279', },
		EC   = { 'Ecuador',                 qid = 'Q736', },
		FK   = { 'Falkland Islands',        qid = 'Q9648', the = true, },
		GF   = { 'French Guiana',           qid = 'Q3769', },
		GS   = { 'South Georgia and the South Sandwich Islands',
		                                    qid = 'Q35086', },
		GY   = { 'Guyana',                  qid = 'Q734', },
		PE   = { 'Peru',                    qid = 'Q419', },
		PY   = { 'Paraguay',                qid = 'Q733', },
		SR   = { 'Suriname',                qid = 'Q730', },
		TT   = { 'Trinidad and Tobago',     qid = 'Q754', mark = '‡', }, --[[Trinidad is off the eastern coasts of South American plate, like Venezuela and Guianas]]
		UY   = { 'Uruguay',                 qid = 'Q77', },
		VE   = { 'Venezuela',               qid = 'Q717', },
	},
}