formatjs README

The project's README from github.com/formatjs/formatjs. As one markdown file: README.md.

FormatJS

Unit Tests Slack FormatJS Sauce Browser Matrix Status

This repository is the home of FormatJS and related libraries.

Slack: Join us on Slack at formatjs.slack.com for help, general conversation and more 💬🎊🎉 You can sign-up using this invitation link.

Development

See CONTRIBUTING.md for instructions.

Published Packages

Package Version Changelog License
@formatjs/cli version CHANGELOG license
@formatjs/cli-lib version CHANGELOG license
@formatjs/icu-messageformat-parser version CHANGELOG license
@formatjs/intl-datetimeformat version CHANGELOG license
@formatjs/intl-displaynames version CHANGELOG license
@formatjs/intl-getcanonicallocales version CHANGELOG license
@formatjs/intl-listformat version CHANGELOG license
@formatjs/intl-locale version CHANGELOG license
@formatjs/intl-localematcher version CHANGELOG license
@formatjs/intl-numberformat version CHANGELOG license
@formatjs/intl-pluralrules version CHANGELOG license
@formatjs/intl-relativetimeformat version CHANGELOG license
@formatjs/intl-segmenter version CHANGELOG license
@formatjs/intl version CHANGELOG license
@formatjs/ts-transformer version CHANGELOG license
babel-plugin-formatjs version CHANGELOG license
eslint-plugin-formatjs version CHANGELOG license
intl-messageformat version CHANGELOG license
react-intl version CHANGELOG license
@formatjs/utils version CHANGELOG license

Big Thanks

Cross-browser Testing Platform and Open Source <3 Provided by Sauce Labs

formatjs (formatjs/formatjs)

Searching Database…

14.7K ·GitHub
What is this?FormatJS is a monorepo of JavaScript internationalization (i18n) libraries — message formatting, date/time/number formatting, and pluralization — with react-intl as its most popular package for React apps.
Is this one library or a collection of packages?It's a monorepo publishing around 20 separate npm packages (react-intl, intl-messageformat, @formatjs/intl-numberformat, cli tools, babel/eslint plugins, etc.) that you pick and install individually based on what you need.
How do I add FormatJS to my project?Install the specific package for your use case via npm or yarn — react-intl for React apps, intl-messageformat for framework-agnostic message formatting, or one of the @formatjs/intl-* polyfills for specific Intl APIs.
Do I need React to use any of this?No — react-intl is just the React binding; core packages like intl-messageformat and the @formatjs/intl-* polyfills work standalone in any JavaScript environment, browser or Node.
What is ICU MessageFormat and why does it matter here?It's the syntax formatjs uses for translatable strings with placeholders, plurals, and gender/select cases (via intl-messageformat and icu-messageformat-parser), letting translators write one message string that adapts to any locale's grammar rules.
Why are there so many separate packages instead of one library?Each Intl capability (DateTimeFormat, NumberFormat, PluralRules, ListFormat, Segmenter, etc.) ships as its own @formatjs/intl-* polyfill package so apps only pull in the formatting features and locale data they actually need.
Does it come with build tooling for translations?Yes — @formatjs/cli extracts and compiles translation messages, and there are babel-plugin-formatjs and eslint-plugin-formatjs for extracting ids at build time and linting message usage.
Why use react-intl instead of the native Intl API directly?react-intl and the @formatjs/intl-* packages polyfill and normalize behavior across browsers/Node versions where native Intl support is inconsistent or missing, while adding React components/hooks for formatting in JSX.
Creator
formatjs
Size
94.1 MB
Stars
14.7K
Age
12y
Commits · 90 Days