Difference between revisions of "Template:Currency/Format"

From blackwiki
Jump to navigation Jump to search
imported>SimonTrew
(doc)
imported>SimonTrew
(not amount|)
 
Line 1: Line 1:
<includeonly>{{nowrap|{{#switch:{{{1}}}
+
<includeonly>{{nowrap|{{#switch:{{{1|}}}
|b={{{2|}}}{{amount|{{{3|}}}}}
+
|b={{{2|}}}{{{3|}}}
|bs={{{2|}}}&nbsp;{{amount|{{{3|}}}}}
+
|bs={{{2|}}}&nbsp;{{{3|}}}
|a={{amount|{{{3|}}}}}{{{2|}}}
+
|a={{{3|}}}{{{2|}}}
|as={{amount|{{{3|}}}}}&nbsp;{{{2|}}}
+
|as={{{3|}}}&nbsp;{{{2|}}}
|={{{2|}}}{{amount|{{{3|}}}}}
+
|={{{2|}}}{{{3|}}}
 
}}}}
 
}}}}
 
</includeonly><noinclude>
 
</includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 09:36, 30 November 2015

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

For a given result of {{Currency/Position}}, formats a currency symbol and amount. Pass the same value for the first parameter to {{Currency/Type}} to create a link to documentation on a given currency.

Examples

Input Result
{{Currency/Format|b|1234.56|€}} €1234.56
{{Currency/Format|bs|1234.56|EUR}} EUR 1234.56
{{Currency/Format|a|€|1234.56}} 1234.56€
{{Currency/Format|as|EUR|1234.56}} 1234.56 EUR
{{Currency/Format||EUR|1234.56}} EUR1234.56
{{Currency/Format|||1234.56}} 1234.56
{{Currency/Format|{{Currency/Position|EUR}}|{{Currency/Type|EUR}}|1234.56}} 1234.56
{{Currency/Format|{{Currency/Position|HUF}}|{{Currency/Type|HUF}}|1234.56}} 1234.56 Ft