Difference between revisions of "Template:CountryPrefixThe"
imported>BrownHairedGirl (add the German colonial empire) |
imported>BrownHairedGirl (add Dutch Empire) |
||
| Line 1: | Line 1: | ||
<includeonly>{{{{{|safesubst:}}}#switch: {{{1|}}} | <includeonly>{{{{{|safesubst:}}}#switch: {{{1|}}} | ||
| − | | Austrian Empire | Bahamas | Batavian Republic | British Empire | British Virgin Islands | Bukharan People's Soviet Republic| Central African Republic | Cayman Islands | Comoros| Cook Islands | Czech Republic| Democratic Republic of the Congo | Dominican Republic | Dominion of Newfoundland | Dutch Republic | Falkland Islands | Faroe Islands | Federated States of Micronesia | Federation of Rhodesia and Nyasaland | French colonial empire | Gambia | German colonial empire | German Empire | Habsburg Monarchy | Holy Roman Empire | Holy See | Irish Free State | Isle of Man | Kingdom of Hawaii | Kingdom of Naples | Kingdom of Sardinia | Kingdom of the Two Sicilies | Maldives | Marshall Islands | Netherlands | Netherlands Antilles | Northern Mariana Islands | Ottoman Empire | Palestinian territories | State of Palestine | Pitcairn Islands | Philippines | Republic of the Congo | Republic of Genoa | Republic of Ireland | Republic of Macedonia | Republic of New Granada | Republic of Texas | Republic of Venice | Russian Empire | Sahrawi Arab Democratic Republic | Solomon Islands | Soviet Union | Thirteen Colonies | Turks and Caicos Islands | United Arab Emirates | United Kingdom | United States | United States Virgin Islands =<!-- | + | | Austrian Empire | Bahamas | Batavian Republic | British Empire | British Virgin Islands | Bukharan People's Soviet Republic| Central African Republic | Cayman Islands | Comoros| Cook Islands | Czech Republic| Democratic Republic of the Congo | Dominican Republic | Dominion of Newfoundland | Dutch Empire | Dutch Republic | Falkland Islands | Faroe Islands | Federated States of Micronesia | Federation of Rhodesia and Nyasaland | French colonial empire | Gambia | German colonial empire | German Empire | Habsburg Monarchy | Holy Roman Empire | Holy See | Irish Free State | Isle of Man | Kingdom of Hawaii | Kingdom of Naples | Kingdom of Sardinia | Kingdom of the Two Sicilies | Maldives | Marshall Islands | Netherlands | Netherlands Antilles | Northern Mariana Islands | Ottoman Empire | Palestinian territories | State of Palestine | Pitcairn Islands | Philippines | Republic of the Congo | Republic of Genoa | Republic of Ireland | Republic of Macedonia | Republic of New Granada | Republic of Texas | Republic of Venice | Russian Empire | Sahrawi Arab Democratic Republic | Solomon Islands | Soviet Union | Thirteen Colonies | Turks and Caicos Islands | United Arab Emirates | United Kingdom | United States | United States Virgin Islands =<!-- |
################################################################################################## | ################################################################################################## | ||
# 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 | ||
Revision as of 14:53, 21 March 2020
| 40px | This template is used on approximately 87,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
Transclusion count updated automatically (see documentation). |
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
{{CountryPrefixThe|Kenya}}→ Kenya{{CountryPrefixThe|Philippines}}→ the Philippines
- with "onlythe=yes"
{{CountryPrefixThe|Kenya|onlythe=yes}}→{{CountryPrefixThe|Philippines|onlythe=yes}}→ the
- with "capitalised=yes"
{{CountryPrefixThe|Kenya|capitalised=yes}}→ Kenya{{CountryPrefixThe|Philippines|capitalised=yes}}→ The Philippines
Note that the alternative spelling "capitalized=yes" has the same effect
- with both "onlythe=yes" and "capitalised=yes"
{{CountryPrefixThe|Kenya|onlythe=yes|capitalised=yes}}→{{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
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.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Input value | 1 | The value to be evaluated | String | required |
| 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' | String | optional |
| Capitalise 'the'? | capitalised | Capitalises the word 'the' as 'The' when the input value is a case-insensitive forms of 'Yes', 'Y', 'True' or '1' | String | optional |
| 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' | String | optional |
| The above documentation is transcluded from Template:CountryPrefixThe/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |