lcids
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

LCIDs

TypeScript representation of Windows Language Code Identifiers (LCID) and CultureInfo

Description:

The package gives you TypeScript/JS representation of over 200 .NET SpecificCultures

//PowerShell [CultureInfo]::GetCultures([System.Globalization.CultureTypes]::SpecificCultures) | select LCID,Name,DisplayName,NativeName | ConvertTo-Json | Out-File -FilePath CultureInfos.js

Installation:

npm i lcids

Usage:

Use lcids object to get an array of objects mapping LCID to culture name, one of these objects below

import { lcids } from 'lcids';
lcids
// ...
//{
//    "LCID":  1033,
//    "Name":  "en-US",
//    "DisplayName":  "English (United States)",
//    "NativeName":  "English (United States)"
//},
// ...

Use CultureInfo class to create culture info object by name or LCID based on the above array.

import { CultureInfo } from 'lcids';
new CultureInfo({ name: "en-US" })
new CultureInfo({ lcid: 1033 })

Package Sidebar

Install

npm i lcids

Weekly Downloads

23

Version

1.0.4

License

MIT

Unpacked Size

140 kB

Total Files

10

Last publish

Collaborators

  • tomaszoida