Difference between revisions of "Template:Currency/Type"
Jump to navigation
Jump to search
imported>SimonTrew (Perhaps this is just me but the table I added as examples actually I was invoking the wrong template! So I do think this works. Feel free to revert if not) |
imported>GreenC (still not working) |
||
| Line 1: | Line 1: | ||
| − | + | {{#switch:{{uc:{{{1|}}}}}<!-- If you add a case to this switch statement, be sure to give the case in upper case letters, since the us parser function used here converts everything given to upper case. --> | |
| + | |AED=[[United Arab Emirates dirham|AD]] | ||
| + | |AFN=[[Afghan Afghani|؋]] | ||
| + | |ALL=[[Albanian lek|L]] | ||
| + | |AMD=[[Armenian dram|դր.]] | ||
| + | |ANG=[[Netherlands Antillean guilder|NAƒ]] | ||
| + | |AOA=[[Kwanza|Kz]] | ||
| + | |ARS=[[Argentine peso|AR$]] | ||
| + | |AUD=[[Australian dollar|A$]] | ||
| + | |AWG=[[Aruban guilder|Afl.]] | ||
| + | |AZN=[[Azerbaijani manat|man.]] | ||
| + | |BAM=[[Bosnia and Herzegovina konvertibilna marka|KM]] | ||
| + | |BBD=[[Barbados dollar|Bds$]] | ||
| + | |BDT=[[Bangladeshi taka|৳]] | ||
| + | |BGN=[[Bulgarian lev|лв]] | ||
| + | |BHD=[[Bahraini dinar|BD]] | ||
| + | |BIF=[[Burundian franc|FBu]] | ||
| + | |BITCOIN=[[Bitcoin|BTC]] | ||
| + | |BMD=[[Bermudian dollar|BD$]] | ||
| + | |BND=[[Brunei dollar|B$]] | ||
| + | |BOB=[[Boliviano|Bs.]] | ||
| + | |BRL=[[Brazilian real|R$]] | ||
| + | |BSD=[[Bahamian dollar|B$]] | ||
| + | |BTC=[[Bitcoin|BTC]] | ||
| + | |BTN=[[Ngultrum|Nu.]] | ||
| + | <!-- "buck" intentionally avoided here, due to the ambiguity in use between Canadian/US dollar --> | ||
| + | |BWP=[[Botswana pula|P]] | ||
| + | |BYR=[[Belarusian ruble|Br]] | ||
| + | |BZD=[[Belize dollar|BZ$]] | ||
| + | |C=[[Canadian dollar|CA$]] | ||
| + | |CAN=[[Canadian dollar|CA$]] | ||
| + | |CAD=[[Canadian dollar|CA$]] | ||
| + | |CDF=[[Congolese franc|FC]] | ||
| + | |CHF=[[Swiss franc|CHF]] | ||
| + | |CLP=[[Chilean peso|CL$]] | ||
| + | |CNY=[[Renminbi|CN¥]] | ||
| + | |COP=[[Colombian peso|COL$]] | ||
| + | |HNL=[[Honduran lempira|L]] | ||
| + | |HRK=[[Croatian kuna|HRK]] | ||
| + | |HUARD=[[Canadian dollar|CA$]] | ||
| + | |LOONIE=[[Canadian dollar|CA$]] | ||
| + | |PIASTRE=[[Canadian dollar|CA$]] | ||
| + | |PIASSE=[[Canadian dollar|CA$]] | ||
| + | |CANADA=[[Canadian dollar|CA$]] | ||
| + | |CANADIAN=[[Canadian dollar|CA$]] | ||
| + | |STUTZ=[[Swiss franc|CHF]] | ||
| + | |STEI=[[Swiss franc|CHF]] | ||
| + | |EIER=[[Swiss franc|CHF]] | ||
| + | |SCHNAGG=[[Swiss franc|CHF]] | ||
| + | |FRANC=[[Swiss franc|CHF]] | ||
| + | |RMB=[[Renminbi|CN¥]] | ||
| + | |DKK=[[Danish krone|kr ]] | ||
| + | |DKK2=[[Danish krone|DKK ]] <!--alternative--> | ||
| + | |EGP=[[Egyptian pound|LE ]] | ||
| + | |GRD=[[Greek drachma|₯]] | ||
| + | |HKD=[[Hong Kong dollar|HK$]] | ||
| + | |HUF=[[Hungarian forint|Ft]] | ||
| + | |IDR=[[Indonesian rupiah|Rp ]] | ||
| + | <!-- The Unicode glyph for the Indian rupee symbol '₹' was introduced 15 July 2010 but may not be in all fonts yet. May consider returning to the more widely implemented '₨ ' --> | ||
| + | |INR=[[Indian rupee|₹]] | ||
| + | |ILS=[[Israeli new shekel|₪]] | ||
| + | |IRR=[[Iranian rial|﷼]] | ||
| + | |ISK=[[Icelandic króna|kr ]] | ||
| + | |KHR=[[Cambodian riel|៛]] | ||
| + | |KPW=[[North Korean won|₩]] | ||
| + | |KRW=[[South Korean won|₩]] | ||
| + | |KSH=[[Kenyan shilling|KSh.]] | ||
| + | |KES=[[Kenyan shilling|KSh.]] | ||
| + | |LAK=[[Lao kip|₭]] | ||
| + | |LKR=[[Sri Lankan rupee|Rs]] | ||
| + | |LTL=[[Lithuanian litas|Lt]] | ||
| + | |MNT=[[Mongolian tögrög|₮]] | ||
| + | |MXN=[[Mexican peso|MXN]] | ||
| + | |MYR=[[Malaysian ringgit|RM]] | ||
| + | |NPR=[[Nepalese Rupee|Rs]] | ||
| + | |NEP=[[Nepalese Rupee|Rs]] | ||
| + | |NOK=[[Norwegian krone|kr ]] | ||
| + | |NOK2=[[Norwegian krone|NOK ]] <!--alternative--> | ||
| + | |NGN=[[Nigerian naira|₦]] | ||
| + | |NLG=[[Dutch guilder|ƒ]] | ||
| + | |NZD=[[New Zealand dollar|NZ$]] | ||
| + | |PHP=[[Philippine peso|₱]] | ||
| + | |RUB=[[Russian ruble|PP]] <!-- after Aug 1998 redenomination --> | ||
| + | |RUR=[[Russian ruble|руб.]] <!-- before Aug 1998 redenomination --> | ||
| + | |RWF=[[Rwandan franc|FRw]] | ||
| + | |FRW=[[Rwandan franc|FRw]] | ||
| + | |SAR=[[Saudi riyal|SAR ]] | ||
| + | |SEK=[[Swedish krona|kr ]] | ||
| + | |SEK2=[[Swedish krona|SEK ]] <!--alternative--> | ||
| + | |SGD=[[Singapore dollar|S$]] | ||
| + | |SYP=[[Syrian pound|£S]] | ||
| + | |TSH=[[Tanzanian shilling|TSh.]] | ||
| + | |TZS=[[Tanzanian shilling|TSh.]] | ||
| + | |THB=[[Thai baht|฿]] | ||
| + | |USH=[[Ugandan shilling|USh.]] | ||
| + | |UGS=[[Ugandan shilling|USh.]] | ||
| + | |UGX=[[Ugandan shilling|USh.]] | ||
| + | |VND=[[Vietnamese đồng|₫]] | ||
| + | |JPY=[[Japanese yen|¥]] | ||
| + | |EU=[[Euro|€]] | ||
| + | |EUR=[[Euro|€]] | ||
| + | |EURO=[[Euro|€]] | ||
| + | |THE SINGLE CURRENCY=[[Euro|€]] | ||
| + | |EGE=[[Euro|€]] | ||
| + | |EUMELN=[[Euro|€]] | ||
| + | |KNAAK=[[Euro|€]] | ||
| + | |TEURO=[[Euro|€]] | ||
| + | |TRL=[[Turkish lira#First Turkish lira (1923-2005)|TRL]] | ||
| + | |TRY=[[Turkish lira#Second Turkish lira (2005-present)|₺]] | ||
| + | |TWD=[[New Taiwan dollar|NT$]] | ||
| + | |UK=[[Pound sterling|GB£]] | ||
| + | |GB=[[Pound sterling|GB£]] | ||
| + | |GBP=[[Pound sterling|GB£]] | ||
| + | |UKP=[[Pound sterling|GB£]] | ||
| + | |BRITAIN=[[Pound sterling|GB£]] | ||
| + | |GREAT BRITAIN=[[Pound sterling|GB£]] | ||
| + | |UNITED KINGDOM=[[Pound sterling|GB£]] | ||
| + | |UNITED KINGDOM OF GREAT BRITAIN AND NORTHERN IRELAND=[[Pound sterling|GB£]] | ||
| + | |GGP=[[Guernsey pound|GG£]] | ||
| + | |JEP=[[Jersey pound|JE£]] | ||
| + | |IMP=[[Isle of Man pound|IM£]] | ||
| + | |UAH=[[Ukrainian hryvnia|₴]] | ||
| + | |US=[[United States dollar|US$]] | ||
| + | |U.S.=[[United States dollar|US$]] | ||
| + | |USA=[[United States dollar|US$]] | ||
| + | |USD=[[United States dollar|US$]] | ||
| + | |USS=[[United States dollar|US$]] | ||
| + | |UNITED STATES=[[United States dollar|US$]] | ||
| + | |XBT=[[Bitcoin|BTC]] | ||
| + | |ZAR=[[South African rand|R]] | ||
| + | |=[[United States dollar|US$]] | ||
| + | }}<noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 16:08, 30 November 2015
This is the type sub-template to Template:Currency. The Type sub-template converts the value it is given to the appropriate linked currency name, e.g., [[United States dollar|US$]].
Usage
Note: This template should generally not be used alone.
There is only one unnamed parameter used in this template, which finds the link from {{Currency/Link}} and the symbol from {{Currency/Symbol}}. Note that any value given to it is converted to upper case before processing for matches, so this template does not distinguish between "United States" and "UNITED STATES", for example. If the parameter is empty, the result is as for USD. If the parameter is unknown, behavior is undefined.
Examples
| Parameter | Result |
|---|---|
{{Currency/Type|GBP}} |
GB£ |
{{Currency/Type|EUR}} |
€ |
{{Currency/Type|USD}} |
US$ |
{{Currency/Type|CNY}} |
CN¥ |
{{Currency/Type|HUF}} |
Ft |
{{Currency/Type|MYR}} |
RM |
{{Currency/Type|XYZ}} |
|
{{Currency/Type|}} |
US$ |
{{Currency/Type}} |
US$ |
See also
| The above documentation is transcluded from Template:Currency/Type/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |