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.
See CONTRIBUTING.md for instructions.
Choose by application ecosystem. Registry names identify how to install a package;
implementation language can differ. For example, @formatjs/cli is Rust-backed
and distributed through npm.
| Ecosystem | Distribution | Entry point |
|---|---|---|
| JavaScript / TypeScript | npm | React, Vue, Svelte, message formatting, Intl polyfills, build tools |
| Rust | crates.io | Message runtime, parsers, Intl cores |
| Python | PyPI | Rust-backed message runtime and parser bindings |
| Hermes / React Native | npm & GitHub Releases | Autolinked RN packages (@formatjs/react-native-hermes-intl, @formatjs/react-native-hermes-temporal) and native SDK |
npm packages expose JavaScript APIs with TypeScript types. Rust crates expose native operations for Rust applications and host integrations. LocaleMatcher is a proposal ponyfill; the other rows implement standardized Intl APIs.
DateTimeFormat calendar add-ons are npm packages named
@formatjs/intl-datetimeformat-calendar-*; see calendar installation.
Rust calendar support is in formatjs_intl_datetimeformat_calendars.
| Purpose | Packages |
|---|---|
| Application APIs | react-intl, vue-intl, @formatjs/svelte-intl, @formatjs/intl |
| ICU MessageFormat | intl-messageformat, @formatjs/icu-messageformat-parser, @formatjs/icu-skeleton-parser |
| CLI | @formatjs/cli, @formatjs/cli-lib |
| Build transforms | babel-plugin-formatjs, @formatjs/ts-transformer, @formatjs/unplugin |
| Linting and editing | eslint-plugin-formatjs, @formatjs/editor |
| Utilities | @formatjs/bigdecimal, @formatjs/fast-memoize, @formatjs/utils, @formatjs/ecma376 |
@formatjs/cli selects its @formatjs/cli-native-* platform package automatically.
Package versions and licenses are listed on npm; changelogs live under packages/.
| Purpose | Crates |
|---|---|
| Application message runtime | formatjs_intl, formatjs_intl_macros |
| ICU MessageFormat runtime | formatjs_icu_messageformat |
| ICU parsers | formatjs_icu_messageformat_parser, formatjs_icu_skeleton_parser |
| Platform printf parsers | formatjs_apple_printf_parser, formatjs_java_printf_parser |
| Locale-data infrastructure | formatjs_intl_data, formatjs_intl_data_build |
| Hermes native archive | formatjs_intl_hermes |
See Rust Intl crates for locale-data features and the application runtime for message catalogs. Standalone CLI binaries are also available in CLI releases.
| Install package | Python import | Purpose |
|---|---|---|
py_intl |
intl |
Application message runtime and catalogs |
icu_messageformat |
icu_messageformat |
ICU MessageFormat runtime |
icu_messageformat_parser |
icu_messageformat_parser |
ICU message parser |
icu_skeleton_parser |
icu_skeleton_parser |
Number/date skeleton parser |
Install with python -m pip install <package>. These wheels bind the Rust
implementations; see the Python package READMEs.
For React Native 0.76+ apps using New Architecture and Hermes, install the
autolinked wrapper packages
@formatjs/react-native-hermes-intl
and optionally
@formatjs/react-native-hermes-temporal.
Gradle and CocoaPods automatically download, SHA-256 verify, and cache the
matching prebuilt SDK archive.
For direct native integration,
SDK releases
ship prebuilt Rust libraries, public headers, C++/JSI adapters, JS installers,
and checksums for Android, iOS/simulator, macOS, and Linux, covering twelve
standard Intl APIs and Temporal. See
installation and supported targets.
Cross-browser Testing Platform and Open Source <3 Provided by Sauce Labs