displayNameFormatter @localizer/format-displayname 1.1.1
A versatile formatter designed to customize the display of country, language, and currency names. It provides flexibility to adapt the output style to various use cases, such as narrow, short, or long formats.
Usage
typescript
import { displayNameFormatter } from '@localizer/format-displayname';
const formatter = displayNameFormatter('region', { style: 'narrow' });
const result = formatter('US');
See formatter options for configuration details.
Demo
Locale | Localized value |
---|---|
en-US | United States |
fr-FR | États-Unis |
de-DE | Vereinigte Staaten |
fi-FI | Yhdysvallat |
sv-FI | USA |
ko-KR | 미국 |
hi-IN | संयुक्त राज्य |