Difference between revisions of "Template:Currency/LongType"

From blackwiki
Jump to navigation Jump to search
imported>Stepho-wrs
(Added CHF for Swiss franc.)
imported>Stepho-wrs
(Added CDF for Congolese franc.)
Line 22: Line 22:
 
|BSD={{formatnum:{{{1}}}}} [[Bahamian dollar]]s
 
|BSD={{formatnum:{{{1}}}}} [[Bahamian dollar]]s
 
|BTN={{formatnum:{{{1}}}}} [[Ngultrum|Nu.]]s
 
|BTN={{formatnum:{{{1}}}}} [[Ngultrum|Nu.]]s
 +
|CDF={{formatnum:{{{1}}}}} [[Congolese franc]]s
 
|CHF={{formatnum:{{{1}}}}} [[Swiss franc]]s
 
|CHF={{formatnum:{{{1}}}}} [[Swiss franc]]s
 
|CLP={{formatnum:{{{1}}}}} [[Chilean peso]]s
 
|CLP={{formatnum:{{{1}}}}} [[Chilean peso]]s

Revision as of 05:08, 18 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