Difference between revisions of "Template:Currency/LongType/doc"
Jump to navigation
Jump to search
imported>SimonTrew (+examples) |
imported>SimonTrew (+examples) |
||
| Line 8: | Line 8: | ||
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 does not match any in the table, US dollars are assumed. | 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 does not match any in the table, US dollars are assumed. | ||
| − | |||
=== Examples === | === Examples === | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 18: | Line 17: | ||
|- | |- | ||
| {{tlc|Currency/LongType|1234.56|USD}} || {{Currency/LongType|1234.56|USD}} | | {{tlc|Currency/LongType|1234.56|USD}} || {{Currency/LongType|1234.56|USD}} | ||
| + | |- | ||
| + | | {{tlc|Currency/LongType|1234.56|GRD}} || {{Currency/LongType|1234.56|GRD}} | ||
| + | |- | ||
| + | | {{tlc|Currency/LongType|1234.56|SEK}} || {{Currency/LongType|1234.56|SEK}} | ||
|- | |- | ||
| {{tlc|Currency/LongType|1234.56|unknown}} || {{Currency/LongType|1234.56|unknown}} | | {{tlc|Currency/LongType|1234.56|unknown}} || {{Currency/LongType|1234.56|unknown}} | ||
Revision as of 14:00, 30 November 2015
| This is a documentation subpage for Template:Currency/LongType. It contains usage information, categories and other content that is not part of the original template page. |
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 does not match any in the table, US dollars are assumed.
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|unknown}} |
1,234.56 United States dollars |
{{Currency/LongType|1234.56|}} |
1,234.56 United States dollars |
See also