UNPKG

@nexim/localizer

Version:

Lightweight i18n utilities to handle translations, number formatting, date/time localization using native browser APIs.

13 lines (8 loc) 4.18 kB
[@nexim/localizer](../README.md) / Locale # Interface: Locale Represents a locale configuration with language code and language identifier. ## Properties | Property | Type | Description | | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- | | <a id="code"></a> `code` | `` `${Lowercase<string>}-${Uppercase<string>}` `` | fa-IR, en-US, ... | | <a id="language"></a> `language` | `"en"` \| `"ar"` \| `"fa"` \| `"nko"` \| `"hi"` \| `"bn"` \| `"pa"` \| `"gu"` \| `"or"` \| `"ta"` \| `"te"` \| `"kn"` \| `"mal"` \| `"sinhala_lith"` \| `"thai"` \| `"lao"` \| `"tibetan"` \| `"myanmar"` \| `"myanmar_shan"` \| `"khmer"` \| `"mongolian"` \| `"limbu"` \| `"new_tai_lue"` \| `"tai_tham_hora"` \| `"tai_tham_tham"` \| `"balinese"` \| `"sundanese"` \| `"lepcha"` \| `"ol_chiki"` \| `"vai"` \| `"saurashtra"` \| `"kayah_li"` \| `"javanese"` \| `"myanmar_tai_laing"` \| `"cham"` \| `"meetei_mayek"` \| `"fullwidth"` \| `"osmanya"` \| `"brahmi"` \| `"sora_sompeng"` \| `"chakma"` \| `"sharada"` \| `"khudawadi"` \| `"newa"` \| `"tirhuta"` \| `"modi"` \| `"takri"` \| `"ahom"` \| `"warang_citi"` \| `"bhaiksuki"` \| `"mro"` \| `"pahawh_hmong"` \| `"mathematical_bold"` \| `"mathematical_double-struck"` \| `"mathematical_sans-serif"` \| `"mathematical_sans-serif_bold"` \| `"mathematical_monospace"` \| `"fula"` | The ISO 639-1 language code (e.g., 'fa', 'en') |