Package

ViewHelpers

ViewHelper Documentation

format.currency

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})

Arguments

currencySign string

(optional) The currency sign, eg $ or €.

decimalSeparator string

(optional) The separator for the decimal point.

thousandsSeparator string

(optional) The thousands separator.

prependCurrency string

(optional) Select if the curreny sign should be prepended

separateCurrency string

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

decimals string

(optional) Set decimals places.

ViewHelper Resources

Schema Resources