တမ်းပလိတ်:CountryPrefixThe/doc
ဤစာမျက်နှာမှာ တမ်းပလိတ်:CountryPrefixThe တမ်းပလိတ်အတွက် အသုံးပြုပုံ လက်စွဲ (documentation) ၏ စာမျက်နှာခွဲ (subpage) တစ်ခုဖြစ်သည်။ ဤစာမျက်နှာတွင် မူရင်း တမ်းပလိတ် page ၌ တစိတ်တပိုင်းအဖြစ် မပါဝင်သည့် အသုံးပြုပုံပြုနည်းနှင့် သက်ဆိုင်သည့် သတင်းအချက်များ၊ ကဏ္ဍများ နှင့် အခြားအချက်အလက်များ ပါဝင်သည်။ |
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
[ပြင်ဆင်ရန်]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.
ပါရာမီတာ | ဖော်ပြချက် | အမျိုးအစား | အခြေအနေ | |
---|---|---|---|---|
Input value | 1 | The value to be evaluated | String | လိုအပ်သည် |
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 | ထည့်လိုပါက |
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 | ထည့်လိုပါက |
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 | ထည့်လိုပါက |