Difference between revisions of "Template:Currency/Type/doc"

From blackwiki
Jump to navigation Jump to search
imported>SimonTrew
(→‎Examples: +HUF example. Not out of WP:UNDUE but cos it's put after the amount, per WP:CURRENCY; it doesn't matter to this template but I'm trying to use the same example currencies across all the templates)
imported>SimonTrew
(+MYR example)
Line 21: Line 21:
 
|-
 
|-
 
| {{tlc|Currency/Page|HUF}} || {{Currency/Page|HUF}}
 
| {{tlc|Currency/Page|HUF}} || {{Currency/Page|HUF}}
 +
|-
 +
| {{tlc|Currency/Page|MYR}} || {{Currency/Page|MYR}}
 
|-
 
|-
 
| {{tlc|Currency/Type|XYZ}} || {{Currency/Type|XYZ}}
 
| {{tlc|Currency/Type|XYZ}} || {{Currency/Type|XYZ}}

Revision as of 15:40, 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/Page|CNY}} Renminbi
{{Currency/Page|HUF}} Hungarian forint,s
{{Currency/Page|MYR}} Malaysian ringgit
{{Currency/Type|XYZ}}
{{Currency/Type|}} US$

See also