JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q53405F
  • License MIT

TypeScript CultureInfo and LCIDs

Package Exports

  • lcids

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (lcids) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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 })