JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 22041
  • Score
    100M100P100Q135450F
  • License Unlicense

A TypeScript enum of all locales, such as "en-US".

Package Exports

  • locale-enum

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 (locale-enum) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

#i18 Locale Enum

A Typescript enum containing all locales, such as en-US or zh-Hant-HK.

Install:

npm i --save locale-enum

Use:

const Locale = require('locale-enum');
console.log(Locale.en_US); // "en-US"

Import using import:

import { Locale } from 'locale-enum';

Note: the enum keys are with underscores, while string values contain dashes.