Documentation

 

Currency formatting

If activeLanguage = 'it', then these translation texts:

// l10n.it.json
{
  "default": "Predefinito: {{ price | currency }}",
  "code": "Con codice: {{ 0 | C : currencyDisplay = code }}",
  "name": "Con nome: {{ 0 | C : currencyDisplay = name }}",
  "symbol": "Con simbolo: {{ 0 | C : currencyDisplay = symbol }}"
}

And this employ will produce the indicated output:

<ng-container *translate="let t; node: 'l10n'">
  <div>{{ t('default', { price: [1234.567, 'EUR'] } }}</div>
  <div>{{ t('code', [[1234.567, 'EUR']]) }}</div>
  <div>{{ t('name', [[1234.567, 'EUR']]) }}</div>
  <div>{{ t('symbol', [[1234.567, 'EUR']]) }}</div>
</ng-container>
 
// HTML output
Predefinito: 1.234,57 €
Con codice: 1.234,57 EUR
Con nome: 1.234,57 euro
Con simbolo: 1.234,57 €
 

The value of the currency must be provided as a 2 element array: the first element is a number, the second one is the currency code. See options later.