# intl-locales-supported

> Utility to help you polyfill the Node.js runtime when the Intl APIs are missing, or if the built-in Intl is missing locale data that you need.

Latest version **1.8.12** (published 2020-07-03) · BSD-3-Clause license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install intl-locales-supported
pnpm add intl-locales-supported
yarn add intl-locales-supported
bun add intl-locales-supported
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.8.12 |
| Published | 2020-07-03 |
| First published | 2015-05-30 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 17.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14745 |
| Author | Eric Ferraiuolo |
| Maintainers | ericf, longlho, okuryu, pyrocat, redonkulus |
| Keywords | i18n, intl, internationalization, localization, globalization |

## Links

- npm: https://www.npmjs.com/package/intl-locales-supported
- Repository: https://github.com/formatjs/formatjs
- Issues: https://github.com/formatjs/formatjs/issues
- npm.io page: https://npm.io/package/intl-locales-supported

## Alternatives

- [messageformat](https://npm.io/package/messageformat.md) — 329.7K weekly downloads
- [@mintlify/scraping](https://npm.io/package/@mintlify/scraping.md) — 294.8K weekly downloads
- [@mintlify/previewing](https://npm.io/package/@mintlify/previewing.md) — 209.5K weekly downloads
- [@mintlify/prebuild](https://npm.io/package/@mintlify/prebuild.md) — 209.5K weekly downloads
- [@mintlify/link-rot](https://npm.io/package/@mintlify/link-rot.md) — 206.3K weekly downloads

## Recent versions

- 1.8.12 (latest) — 2020-07-03
- 1.8.11 — 2020-07-01
- 1.8.10 — 2020-05-27
- 1.8.9 — 2020-05-25
- 1.8.8 — 2020-05-05
- 1.8.7 — 2020-04-28
- 1.8.6 — 2020-04-24
- 1.8.5 — 2020-04-14
- 1.8.4 — 2019-11-26
- 1.8.3 — 2019-11-25
- 1.8.2 — 2019-11-21
- 1.8.1 — 2019-11-20
- 1.8.0 — 2019-10-30
- 1.6.0 — 2019-10-01
- 1.5.0 — 2019-09-20
- … 27 more at https://npm.io/package/intl-locales-supported/versions

## README

# intl-locales-supported

Utility to help you determine if your runtime has modern Intl API & locales support. This specifically checks for `Intl.NumberFormat`, `Intl.PluralRules` & `Intl.RelativeTimeFormat` and is being used by `react-intl`.

[![npm Version](https://badgen.net/npm/v/intl-locales-supported)](https://www.npmjs.org/package/intl-locales-supported)
![size](https://badgen.net/bundlephobia/minzip/intl-locales-supported)

## Usage

```js
const areIntlLocalesSupported = require('intl-locales-supported');

const localesMyAppSupports = [
  /* list locales here */
];

// Determine if the built-in `Intl` has the locale data we need.
if (
  !areIntlLocalesSupported(localesMyAppSupports, [
    Intl.PluralRules,
    Intl.RelativeTimeFormat,
  ])
) {
  // `Intl` exists, but it doesn't have the data we need, so load the
  // polyfill and replace the constructors we need with the polyfill's.
  require('@formatjs/intl-pluralrules/polyfill');
  require('@formatjs/intl-pluralrules/locale-data/de'); // Load de

  require('@formatjs/intl-relativetimeformat/polyfill');
  require('@formatjs/intl-relativetimeformat/locale-data/de'); // Load de
}
```

---
_Source: https://npm.io/package/intl-locales-supported · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
