Ship in42 languages
FormatJS is a set of JavaScript libraries for internationalization, built on ICU MessageFormat, Unicode CLDR and the ECMA-402 Intl APIs.
Intl.PluralRules('en').select(42) → other{
"hero.ship": "Ship in",
"hero.count": "{count, plural, =0 {no languages} one {# language} other {# languages}}"
}In Arabic, 3 is few
CLDR gives Arabic six plural categories, English two and Japanese one. FormatJS selects the branch with Intl.PluralRules, so every translation says the number the way its own grammar does.
- zero
- one
- two
- few
- many
- other
3 رسائل جديدة
From component to catalog
First, declare messages where they render.
defineMessages keeps the English default, a note for translators and a stable ID next to the component that uses it.
Then extract them with one command.
formatjs extract reads your source and writes a catalog your translation tool can open. The CLI ships native binaries for macOS, Linux and Windows.
Finally, compile and ship each locale.
formatjs compile --ast pre-parses every translation, so the browser formats messages without loading the parser.
import {defineMessages, FormattedMessage} from 'react-intl'
const messages = defineMessages({
unread: {
defaultMessage:
'{count, plural, one {# new message} other {# new messages}}',
description: 'Inbox header, count of unread mail',
},
})
export function InboxHeader({count}) {
return (
<h2>
<FormattedMessage {...messages.unread} values={{count}} />
</h2>
)
}Pick your stack.
The libraries follow.
Read the docsDownloads · last 30 days (2026-09-23–2026-10-22)
react-intlComponents and hooks for React and React Native12M downloads in the last 30 daysnpm@formatjs/intlThe framework-agnostic core that react-intl is built on13.1M downloads in the last 30 daysnpmeslint-plugin-formatjsLint rules for message syntax, placeholders and IDs2.8M downloads in the last 30 daysnpmRead the React guideIn production at
Atlassian
Elastic
Grafana Labs
Red Hat
Mattermost
Canva
Microsoft
Adobe
Databricks
Snowflake
Ethereum