Template:Currency/doc
Template:Currency invokes function main in Module:Currency using Lua.
The currency template formats currency using the in-game icons.
Usage
Code | Visible result |
---|---|
{{Currency|0}} | 0 |
{{Currency|100}} | 100 |
{{Currency|200100}} | 200 100 |
{{Currency|300200100}} | 300 200 100 |
{{Currency|400300200100}} | 400 300 200 100 |
{{Currency|400000000000}} | 400 |
{{Currency|300000100}} | 300 0 100 |
{{Currency|400000200000}} | 400 300 200 100 |
{{Currency|-1}} | -1 |
{{Currency|-400000200000}} | -400 300 200 100 |
{{Currency|2*(8/4)}} | 4 |
force_sign
Force a sign in front of the currency.
{{Currency|200100|force_sign=yes}}
: +200 100
{{Currency|-200100|force_sign=yes}}
: -200 100 (no effect)
{{Currency|0|force_sign=yes}}
: ±0
all_signs
Show the sign on all denominations
{{Currency|-200100|all_signs=yes}}
: -200 -100
{{Currency|200100|force_sign=yes|all_signs=yes}}
: +200 +100
show_zeroes
After the first denomination is shown, show all smaller denominations even if there are zero of them
{{Currency|400000000000|show_zeroes=yes}}
: 400
{{Currency|300000100|show_zeroes=yes}}
: 300 0 100