Difference between revisions of "Template:Currency/Page"

From blackwiki
Jump to navigation Jump to search
imported>SimonTrew
(no need for special handling for "e" really, only Drachma uses it)
imported>SimonTrew
(+trim)
 
Line 1: Line 1:
<includeonly>{{#switch:{{uc:{{{1|}}}}}<!-- If you add a case to this switch statement, be sure to give the case in upper case letters, since the us parser function used here converts everything given to upper case. -->
+
<includeonly>{{trim|{{#switch:{{uc:{{{1|}}}}}<!-- If you add a case to this switch statement, be sure to give the case in upper case letters, since the us parser function used here converts everything given to upper case. -->
 
|AED=United Arab Emirates dirham,s
 
|AED=United Arab Emirates dirham,s
 
|AFN=Afghan Afghani,s
 
|AFN=Afghan Afghani,s
Line 77: Line 77:
 
|=United States dollar,s
 
|=United States dollar,s
 
|{{error|unknown parameter value for template {{PAGENAME}}: "<code>{{{1}}}</code>"}}
 
|{{error|unknown parameter value for template {{PAGENAME}}: "<code>{{{1}}}</code>"}}
}}</includeonly><noinclude>
+
}}}}</includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 15:30, 30 November 2015

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

Returns a comma-separated list of values for the Wikipedia article which can be linked to for a given currency and how to pluralise the currency for display in a piped link.

Usage

The first positional parameter is the name of the currency, which is coded in a lookup table. The template returns the name of the page having information on the currency, and also how to display a plural form. Use {{first word}} to extract the Wikipedia link; {{Currency/Link}} will format a piped link.

Examples

Parameter Result
{{Currency/Page|GBP}} Pound sterling,pounds sterling
{{Currency/Page|EUR}} Euro,s
{{Currency/Page|USD}} United States dollar,s
{{Currency/Page|GRD}} Greek drachma,Greek drachmae
{{Currency/Page|SKR}} Swedish krona,Swedish kronor
{{Currency/Page|CNY}} Renminbi
{{Currency/Page|HUF}} Hungarian forint,s
{{Currency/Page|HUF}} Malaysian ringgit
{{Currency/Page|}} United States dollar,s
{{Currency/Page}} United States dollar,s