Difference between revisions of "Template:Currency/LongType"

From blackwiki
Jump to navigation Jump to search
imported>Davykamanzi
(Including arguments for Kenyan, Ugandan & Tanzanian shilling and Rwandan franc; moving the "QUID" argument to the British Pound sterling from the Euro (nobody calls Euros "quid"; that nickname is mostly associated with British pounds))
imported>Stepho-wrs
(Changing QUID from Euro to pounds will silently change the meaning if it is in use. Better to delete the slang and have the article page complain so that it can be fixed properly.)
Line 69: Line 69:
 
|ZAR={{formatnum:{{{1}}}}} [[South African rand]]
 
|ZAR={{formatnum:{{{1}}}}} [[South African rand]]
 
|EU|EUR|EURO|THE SINGLE CURRENCY|EGE|EUMELN|KNAAK|TEURO={{formatnum:{{{1}}}}} [[Euro]]s
 
|EU|EUR|EURO|THE SINGLE CURRENCY|EGE|EUMELN|KNAAK|TEURO={{formatnum:{{{1}}}}} [[Euro]]s
|GBP|POUND|POUND STERLING|QUID={{formatnum:{{{1}}}}} [[Pound sterling|pounds sterling]]
+
|GBP|POUND|POUND STERLING={{formatnum:{{{1}}}}} [[Pound sterling|pounds sterling]]
 
|US|U.S.|USA|USD|USS|UNITED STATES={{formatnum:{{{1}}}}} [[United States dollar]]s
 
|US|U.S.|USA|USD|USS|UNITED STATES={{formatnum:{{{1}}}}} [[United States dollar]]s
 
|{{formatnum:{{{1}}}}} [[United States dollar]]s
 
|{{formatnum:{{{1}}}}} [[United States dollar]]s

Revision as of 05:51, 1 November 2015

{{{1}}} United States dollars

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

This is the type sub-template to Template:Currency. The LongType sub-template converts the values it is given to the appropriate currency plus the linked currency name (for example: [[United States dollar]]s).

Usage

Note: This template should generally not be used alone.

This template uses two unnamed parameters, the second of which is matched against a table to find the linked currency name to output. 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. The first parameter should be the amount of the currency. If the currency parameter is empty, US dollars are assumed; if it matches no entry, behavior is undefined.

Examples

Parameter Result
{{Currency/LongType|1234.56|GBP}} 1,234.56 pounds sterling
{{Currency/LongType|1234.56|EUR}} 1,234.56 Euros
{{Currency/LongType|1234.56|USD}} 1,234.56 United States dollars
{{Currency/LongType|1234.56|GRD}} 1,234.56 Greek drachmae
{{Currency/LongType|1234.56|SEK}} 1,234.56 Swedish kronor
{{Currency/LongType|1234.56|HUF}} 1,234.56 Hungarian forints
{{Currency/LongType|1234.56|MYR}} 1,234.56 Malaysian ringgit
{{Currency/LongType|1234.56|CNY}} 1,234.56 Renminbi
{{Currency/LongType|1234.56|unknown}} 1,234.56 United States dollars
{{Currency/LongType|1234.56|}} 1,234.56 United States dollars

See also