How to use the @phensley/language-tag.substituteRegionAliases function in @phensley/language-tag

To help you get started, we’ve selected a few @phensley/language-tag examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github phensley / cldr-engine / packages / locale / src / resolver.ts View on Github external
static resolve(real: string | LanguageTag): LanguageTag {
    const tag = typeof real === 'string' ? parseLanguageTag(real) : real;
    const fast = fastTag(tag);
    substituteLanguageAliases(fast);
    substituteRegionAliases(fast);
    addLikelySubtags(fast);
    return returnTag(tag, fast);
  }

@phensley/language-tag

Parsing and construction of BCP 47 language tags

Apache-2.0
Latest version published 2 months ago

Package Health Score

62 / 100
Full package analysis

Similar packages