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

The currency sign, eg $ or .

decimalSeparator string

The separator for the decimal point.

thousandsSeparator string

The thousands separator.

prependCurrency anySimpleType

Select if the currency sign should be prepended

separateCurrency anySimpleType

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

decimals anySimpleType

Set decimals places.

ViewHelper Resources

Schema Resources