Noncommital Premarital Mischief

    @phensley/locale
    TypeScript icon, indicating that this package has built-in type declarations

    1.5.0 • Public • Published

    @phensley/locale

    @phensley/locale min+gzip

    Implements resolving of BCP 47 language tags by alias and likely subtags substitution.

    Installation

    NPM:

    npm install --save @phensley/locale
    

    Yarn:

    yarn add @phensley/locale
    

    Examples

    import { LanguageResolver } from '@phensley/locale-resolver';
    
    const IDS = ['en', 'es', 'es-419', 'und-AR', 'und-Hant', 'iw', 'i-klingon'];
    for (const id of IDS) {
      const r = LanguageResolver.resolve(id);
      console.log(r.expanded());
    }
    en-Latn-US
    es-Latn-ES
    es-Latn-419
    es-Latn-AR
    zh-Hant-TW
    he-Hebr-IL
    tlh-Latn-US
    

    Keywords

    none

    Install

    npm i @phensley/locale

    DownloadsWeekly Downloads

    1,113

    Version

    1.5.0

    License

    Apache-2.0

    Unpacked Size

    337 kB

    Total Files

    39

    Last publish

    Collaborators

    • phensley