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
.
Usage
const areIntlLocalesSupported = require('intl-locales-supported');
const localesMyAppSupports = [
];
if (!areIntlLocalesSupported(localesMyAppSupports)) {
require('@formatjs/intl-pluralrules/polyfill');
require('@formatjs/intl-pluralrules/dist/locale-data/de');
require('@formatjs/intl-relativetimeformat/polyfill');
require('@formatjs/intl-relativetimeformat/dist/locale-data/de');
}
License
This software is free to use under the Yahoo! Inc. BSD license.
See the LICENSE file for license text and copyright information.