ViewHelper Documentation


Formats a given float to a currency representation.

= Examples =

<f:format.currency>123.456</f:format.currency> 123,46

<f:format.currency currencySign="$" decimalSeparator="." thousandsSeparator="," prependCurrency="TRUE" separateCurrency="FALSE" decimals="2">54321</f:format.currency> $54,321.00

{someNumber -> f:format.currency(thousandsSeparator: ',', currencySign: '')} 54,321,00 (depending on the value of {someNumber})


currencySign string

(optional) The currency sign, eg $ or .

decimalSeparator string

(optional) The separator for the decimal point.

thousandsSeparator string

(optional) The thousands separator.

prependCurrency boolean

(optional) Select if the curreny sign should be prepended

separateCurrency boolean

(optional) Separate the currency sign from the number by a single space, defaults to true due to backwards compatibility

decimals integer

(optional) Set decimals places.

ViewHelper Resources

Schema Resources