Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@formatjs/intl-getcanonicallocales

Package Overview
Dependencies
Maintainers
0
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@formatjs/intl-getcanonicallocales

Intl.getCanonicalLocales polyfill

  • 2.5.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
420K
increased by8.57%
Maintainers
0
Weekly downloads
 
Created

What is @formatjs/intl-getcanonicallocales?

@formatjs/intl-getcanonicallocales is a utility package that provides a way to get the canonical form of locale identifiers. This is useful for ensuring consistency and correctness when dealing with locale strings in internationalization (i18n) tasks.

What are @formatjs/intl-getcanonicallocales's main functionalities?

Get Canonical Locales

This feature allows you to convert a list of locale identifiers to their canonical form. This ensures that the locale identifiers are in a standard format, which is important for consistency in internationalization.

const getCanonicalLocales = require('@formatjs/intl-getcanonicallocales');

const locales = ['EN-US', 'fr-FR', 'es-419'];
const canonicalLocales = getCanonicalLocales(locales);
console.log(canonicalLocales); // ['en-US', 'fr-FR', 'es-419']

Other packages similar to @formatjs/intl-getcanonicallocales

Keywords

FAQs

Package last updated on 09 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc