Open main menu

Changes

Template:Data country

471 bytes added, 02:04, 25 September 2014
no edit summary
<noinclude>This is a data template which takes name of the country and returns 2 commonly used currencies (codes), capital, subregion and population. Separated by slashes. Second optional parameter is for choosing which value should template return.
'''Examples:'''
{{Data country|Cuba}} -> CUC/CUP/Havana/Caribbean/11167325
{{#titleparts: Data country|Afghanistan|cur}} -> AFN{{Data country|Afghanistan|cur1}} -> AFN{{Data country| 1 Afghanistan|currency}} -> AFN{{#titleparts: Data country|Afghanistan|currency1}} -> AFN{{Data country|Afghanistan|cur2}} ->{{Data country| 1 Afghanistan| 2 currency2}} ->{{#titleparts: {{Data country|Afghanistan|cap}} -> Kabul{{Data country| 1 Afghanistan| 3 capital}} -> Kabul{{#titleparts: {{Data country|Afghanistan|sub}} -> Southern Asia{{Data country| 1 Afghanistan| 4 subregion}} -> Southern Asia{{#titleparts: {{Data country|Afghanistan|pop}} -> 26023100{{Data country| 1 Afghanistan| 5 population}} -> 26023100
</pre>
[[Category:Templates]]
</noinclude><includeonly>{{#titleparts: {{#switch:{{{1}}}
|Abkhazia=RUB//Sukhumi/Western Asia/240705
|Afghanistan=AFN//Kabul/Southern Asia/26023100
|Zambia=ZMK//Lusaka/Eastern Africa/15023315
|Zimbabwe=ZWL//Harare/Eastern Africa/13061239
|}} | {{#if:{{{2|}}}|1}} | {{#switch:{{{2}}}|cur|cur1|currency|currency1=1|cur2|currency2=2|cap|capital=3|sub|subregion=4|pop|population=5 }} }}<nowiki /></includeonly>