Skip to main content

Overview

The format-currency transformation formats a number as a currency value using the specified currency code and locale.

Syntax

format-currency(<variable>, currency="EUR")

Parameters

ParameterTypeRequiredDescription
variablenumberYesThe number to format as currency
currencystringYesThe currency code (e.g., "EUR", "USD", "GBP")
localestringNoThe locale for formatting (e.g., "en-US", "fr-FR"). Defaults to "en-US"
minDecimalnumberNoMinimum number of decimal places
maxDecimalnumberNoMaximum number of decimal places

Examples

format-currency(<variable>, currency="EUR")
format-currency(<variable>, currency="USD", locale="en-US")
format-currency(<variable>, currency="EUR", locale="fr-FR", minDecimal=2, maxDecimal=2)
For formatting with a locale from a variable, see Format Currency with Locale Variable. For formatting with both locale and currency from variables, see Format Currency with Locale and Currency Variables.