fixedCurrencyFormatter @localizer/format-number 1.1.1
The fixedCurrencyFormatter
is a versatile utility designed to format monetary values consistently using a predefined currency. It allows customization of display options, such as currency symbols, compact notation, and more, ensuring clarity and adaptability for various use cases.
Usage
typescript
import { fixedCurrencyFormatter } from '@localizer/format-number';
const formatter = fixedCurrencyFormatter('EUR', {
currencyDisplay: 'symbol',
notation: 'compact',
compactDisplay: 'short',
});
const result = formatter(21436587);
See formatter options for configuration details.
Demo
Locale | Localized value |
---|---|
en-US | €21,436,587.00 |
fr-FR | 21 436 587,00 € |
de-DE | 21.436.587,00 € |
fi-FI | 21 436 587,00 € |
sv-FI | 21 436 587,00 € |
ko-KR | €21,436,587.00 |
hi-IN | €2,14,36,587.00 |