Difference between revisions of "Template:Currency/LongType"

From blackwiki
Jump to navigation Jump to search
imported>Stepho-wrs
(Added LTL for Lithuanian litas.)
imported>PanchoS
(+ Turkish lira)
Line 59: Line 59:
 
|SGD={{formatnum:{{{1}}}}} [[Singapore dollar]]s
 
|SGD={{formatnum:{{{1}}}}} [[Singapore dollar]]s
 
|THB={{formatnum:{{{1}}}}} [[Thai baht]]
 
|THB={{formatnum:{{{1}}}}} [[Thai baht]]
 +
|TRL={{formatnum:{{{1}}}}} [[Turkish lira#First Turkish lira (1923-2005)|Turkish lira]]
 +
|TRY={{formatnum:{{{1}}}}} [[Turkish lira#Second Turkish lira (2005-present)|Turkish lira]]
 
|TWD={{formatnum:{{{1}}}}} [[New Taiwan dollar|Taiwan dollar]]s
 
|TWD={{formatnum:{{{1}}}}} [[New Taiwan dollar|Taiwan dollar]]s
 
|UAH={{formatnum:{{{1}}}}} [[Ukrainian hryvnia]]
 
|UAH={{formatnum:{{{1}}}}} [[Ukrainian hryvnia]]

Revision as of 14:51, 28 October 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