Difference between revisions of "Template:CountryPrefixThe"

From blackwiki
Jump to navigation Jump to search
imported>BrownHairedGirl
imported>BrownHairedGirl
 
Line 1: Line 1:
 
<includeonly>{{{{{|safesubst:}}}#switch: {{{1|}}}
 
<includeonly>{{{{{|safesubst:}}}#switch: {{{1|}}}
| Austrian Empire | Bahamas | Batavian Republic | Belgian Congo | British Antarctic Territory | British Empire | British Virgin Islands | Bukharan People's Soviet Republic | Cape Colony | Captaincy General of Chile | Cayman Islands | Central African Republic | Collectivity of Saint Martin | Colony of Natal | Colony of Santiago | Comoros | Congo Free State | Cook Islands | Czech Republic | Danish colonial empire | Democratic Republic of the Congo | Dominican Republic | Dominion of Newfoundland | Duchy of Nassau | Dutch East Indies | Dutch Empire | Dutch Republic | Empire of Brazil | Falkland Islands | Falkland Islands Dependencies | Faroe Islands | Federated States of Micronesia | Federation of Rhodesia and Nyasaland | French Union | French colonial empire | Gambia | German Empire | German colonial empire | Gilbert and Ellice Islands | Grand Duchy of Hesse | Grand Duchy of Tuscany | Habsburg Monarchy | Habsburg Netherlands | Holy Roman Empire | Holy See | Inca civilization | Irish Free State | Isle of Man | Italian Empire | Japanese colonial empire | Kazakh Autonomous Socialist Soviet Republic | Kazakh Soviet Socialist Republic | Kingdom of Hanover | Kingdom of Hawaii | Kingdom of Jerusalem | Kingdom of Naples | Kingdom of Sardinia | Kingdom of Sicily | Kingdom of the Two Sicilies | Maldives | Mamluk Sultanate (Cairo) | Maratha Empire | Marshall Islands | Moldavian Autonomous Soviet Socialist Republic | Moldavian Soviet Socialist Republic | Mongol Empire | Mughal Empire | Nagorno-Karabakh Republic | Netherlands | Netherlands Antilles | New Hebrides | Northern Mariana Islands | Orange Free State | Ottoman Empire | Palestinian territories | Papal States | Philippines | Pitcairn Islands | Polish–Lithuanian Commonwealth | Portuguese Empire | Province of Quebec (1763–1791) | Republic of Florence | Republic of Genoa | Republic of Ireland | Republic of Macedonia | Republic of New Granada | Republic of Texas | Republic of Venice | Republic of the Congo | Russian Empire | Sahrawi Arab Democratic Republic | Socialist Republic of Macedonia | Solomon Islands | South African Republic | Soviet Union | Spanish East Indies | Spanish Empire | Spanish West Indies | State of Palestine | Straits Settlements | Swedish colonial empire | Territory of Papua | Thirteen Colonies | Trucial States | Trust Territory of the Pacific Islands | Turkmen Soviet Socialist Republic | Turks and Caicos Islands | United Arab Emirates | United Kingdom | United States | United States Virgin Islands | Viceroyalty of New Granada | Viceroyalty of Peru | Viceroyalty of the Río de la Plata | Zulu Kingdom =<!--
+
| Austrian Empire | Bahamas | Batavian Republic | Belgian Congo | British Antarctic Territory | British Empire | British Virgin Islands | Bukharan People's Soviet Republic | Cape Colony | Captaincy General of Chile | Cayman Islands | Central African Republic | Collectivity of Saint Martin | Colony of Natal | Colony of Santiago | Comoros | Congo Free State | Cook Islands | Czech Republic | Danish colonial empire | Democratic Republic of the Congo | Dominican Republic | Dominion of Newfoundland | Duchy of Nassau | Dutch East Indies | Dutch Empire | Dutch Republic | Empire of Brazil | Falkland Islands | Falkland Islands Dependencies | Faroe Islands | Federated States of Micronesia | Federation of Rhodesia and Nyasaland | French Union | French colonial empire | Gambia | German Empire | German colonial empire | Gilbert and Ellice Islands | Grand Duchy of Hesse | Grand Duchy of Tuscany | Habsburg Monarchy | Habsburg Netherlands | Hawaiian Kingdom | Holy Roman Empire | Holy See | Inca civilization | Irish Free State | Isle of Man | Italian Empire | Japanese colonial empire | Kazakh Autonomous Socialist Soviet Republic | Kazakh Soviet Socialist Republic | Kingdom of Hanover | Kingdom of Hawaii | Kingdom of Jerusalem | Kingdom of Naples | Kingdom of Sardinia | Kingdom of Sicily | Kingdom of the Two Sicilies | Maldives | Mamluk Sultanate (Cairo) | Maratha Empire | Marshall Islands | Moldavian Autonomous Soviet Socialist Republic | Moldavian Soviet Socialist Republic | Mongol Empire | Mughal Empire | Nagorno-Karabakh Republic | Netherlands | Netherlands Antilles | New Hebrides | Northern Mariana Islands | Orange Free State | Ottoman Empire | Palestinian territories | Papal States | Philippines | Pitcairn Islands | Polish–Lithuanian Commonwealth | Portuguese Empire | Province of Quebec (1763–1791) | Republic of Florence | Republic of Genoa | Republic of Ireland | Republic of Macedonia | Republic of New Granada | Republic of Texas | Republic of Venice | Republic of the Congo | Russian Empire | Sahrawi Arab Democratic Republic | Socialist Republic of Macedonia | Solomon Islands | South African Republic | Soviet Union | Spanish East Indies | Spanish Empire | Spanish West Indies | State of Palestine | Straits Settlements | Swedish colonial empire | Territory of Papua | Thirteen Colonies | Trucial States | Trust Territory of the Pacific Islands | Turkmen Soviet Socialist Republic | Turks and Caicos Islands | United Arab Emirates | United Kingdom | United States | United States Virgin Islands | Viceroyalty of New Granada | Viceroyalty of Peru | Viceroyalty of the Río de la Plata | Zulu Kingdom =<!--
 
  ##################################################################################################
 
  ##################################################################################################
 
  # The optional parameter "only the" allow control of whether the countryname is included
 
  # The optional parameter "only the" allow control of whether the countryname is included

Latest revision as of 20:44, 14 August 2020

Template documentation[view] [edit] [history] [purge]

This is a helper template, use by other templates.

Takes a country name, and returns the name prefixed by "the" if that is required in running text. Otherwise just returns the country name.

Optionally, returns just the word "the", if applicable.

In either case, the word "the" may optionally be returned in capitalised form.

Usage

{{CountryPrefixThe|Countryname}}

{{CountryPrefixThe|Countryname|onlythe=yes}}

{{CountryPrefixThe|Countryname|onlythe=yes}}

{{CountryPrefixThe|Countryname|capitalised=yes}}

{{CountryPrefixThe|Countryname|capitalised=yes|onlythe=yes}}

Examples

No parameters
  1. {{CountryPrefixThe|Kenya}} → Kenya
  2. {{CountryPrefixThe|Philippines}} → the Philippines
with "onlythe=yes"
  1. {{CountryPrefixThe|Kenya|onlythe=yes}}
  2. {{CountryPrefixThe|Philippines|onlythe=yes}} → the
with "capitalised=yes"
  1. {{CountryPrefixThe|Kenya|capitalised=yes}} → Kenya
  2. {{CountryPrefixThe|Philippines|capitalised=yes}} → The Philippines

Note that the alternative spelling "capitalized=yes" has the same effect

with both "onlythe=yes" and "capitalised=yes"
  1. {{CountryPrefixThe|Kenya|onlythe=yes|capitalised=yes}}
  2. {{CountryPrefixThe|Philippines|onlythe=yes|capitalised=yes}} → The

Only "the"

The optional parameter "onlythe=yes" allow control of whether the countryname is included in the returned value.

There are some situations where the definite article is needed alone, e.g. when the countryname is to be linked but the word "the" should not be linked.

e.g.: products were exported to [[{{{country}}}]]

If {{{country}}}=United States, then we get a grammatically incorrect result:

products were exported to [[{{{country}}}]]" → products were exported to United States

Alternatively, if {{{country}}}=United States and we use {{CountryPrefixThe}}, then then word the is incorrectly part of the linked text

products were exported to [[{{CountryPrefixThe|{{{country}}}}}]] → products were exported to the United States

The solution is to use the onlythe=yes parameter: "products were exported to {{CountryPrefixThe|{{{country}}}|onlythe=yes}} [[{{country}}]]" → products were exported to the United States

Full parameter list

Unnamed parameter 1= the input value to be evaluated. The other parameters (all named, all optional), set options. The value of the options is calculated by {{Yesno}}, which interprets as "yes" case-insensitive forms of Yes, y, true, and 1

{{yesno
|
| capitalised =
| onlythe = 
}}

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for CountryPrefixThe

This template takes a country name, and returns the name prefixed by 'the' if that is required in running text. Otherwise just returns the country name.

Template parameters

ParameterDescriptionTypeStatus
Input value1

The value to be evaluated

Stringrequired
Output only the word 'the'onlythe

Outputs only the word 'the' when the input value is a case-insensitive forms of 'Yes', 'Y', 'True' or '1'

Stringoptional
Capitalise 'the'?capitalised

Capitalises the word 'the' as 'The' when the input value is a case-insensitive forms of 'Yes', 'Y', 'True' or '1'

Stringoptional
Capitalize 'the'?capitalized

Synonym of 'capitalised'. Capitalises the word 'the' as 'The' when the input value is a case-insensitive forms of 'Yes', 'Y', 'True' or '1'

Stringoptional