> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reelevant.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Format Currency

> Formater un nombre en devise

## Présentation

La transformation `format-currency` formate un nombre en valeur monétaire en utilisant le code devise et la locale spécifiés.

## Syntaxe

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
format-currency(<variable>, currency="EUR")
```

## Paramètres

| Paramètre    | Type   | Requis | Description                                                                 |
| ------------ | ------ | ------ | --------------------------------------------------------------------------- |
| `variable`   | number | Oui    | Le nombre à formater en devise                                              |
| `currency`   | string | Oui    | Le code devise (par ex. `"EUR"`, `"USD"`, `"GBP"`)                          |
| `locale`     | string | Non    | La locale de formatage (par ex. `"en-US"`, `"fr-FR"`). Par défaut `"en-US"` |
| `minDecimal` | number | Non    | Nombre minimum de décimales                                                 |
| `maxDecimal` | number | Non    | Nombre maximum de décimales                                                 |

## Exemples

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
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)
```

<Info>
  Pour un formatage avec la locale provenant d'une variable, voir [Format Currency avec variable Locale](/fr/advanced-guide/transformations/format-currency-locale).
  Pour un formatage avec la locale et la devise provenant de variables, voir [Format Currency avec variables Locale et Devise](/fr/advanced-guide/transformations/format-currency-locale-currency).
</Info>
