React Intl
React components and hooks for internationalizing apps with locale-aware dates, numbers, lists, and pluralized, translated messages.
Repository Health
Technical Analysis
React Intl is the React binding for the FormatJS internationalization suite, the most widely used i18n library in the React ecosystem. It provides a component and hook API — <IntlProvider>, <FormattedMessage>, <FormattedDate>, <FormattedNumber>, <FormattedList>, <FormattedRelativeTime>, and the useIntl hook — that wraps the browser’s built-in Intl APIs so dates, numbers, lists, and pluralized messages render correctly for a user’s locale without hand-rolled formatting logic scattered across a codebase.
Beyond formatting, React Intl standardizes how translated strings are declared (defineMessages) and extracted from source via the companion @formatjs/cli and babel-plugin-formatjs tooling, so translation workflows stay mechanical rather than manual. It’s built on the same core (@formatjs/intl, intl-messageformat, @formatjs/icu-messageformat-parser) shared by FormatJS’s Vue, Svelte, and vanilla-JS bindings, giving teams a consistent ICU MessageFormat syntax across frameworks.
What You Get
<IntlProvider>root component that scopes locale, messages, and format config to a component tree<FormattedMessage>,<FormattedDate>,<FormattedTime>,<FormattedNumber>,<FormattedList>,<FormattedRelativeTime>,<FormattedDisplayName>, and<FormattedDateTimeRange>components for declarative, locale-aware renderinguseIntlhook exposing an imperativeintlobject (formatMessage,formatDate,formatNumber, etc.) for cases where a React element isn’t suitable, such asaria-labelortitleattributesdefineMessages/defineMessagehelpers plus@formatjs/cliandbabel-plugin-formatjsfor extracting translatable strings straight from source- ICU MessageFormat syntax support for pluralization, gender/select formatting, and rich-text message interpolation
- First-class TypeScript types, including the ability to type message IDs and custom formats against your own message catalog
Common Use Cases
- Shipping a multi-locale React app where dates, currency, and numbers must render per the visitor’s region
- Pluralizing and gendering UI copy correctly across languages with very different plural rules
- Extracting and syncing translatable strings from source into a translation management pipeline
- Formatting relative timestamps (“2 days ago”) and locale-correct lists (“A, B, and C”) without a bespoke formatter
- Providing translated
aria/titleattribute strings where a React component can’t be used directly
Under The Hood
Architecture
React Intl’s architecture centers on a provider/context pattern: IntlProvider (components/provider.tsx) builds an IntlShape via createIntl.ts and exposes it through IntlContext to the tree, while every Formatted* component is produced by a shared factory (createFormattedComponent.tsx) that wraps an underlying formatter method (formatDate, formatNumber, etc.) instead of reimplementing formatting logic per component — keeping the component layer thin around one formatters core. Message resolution and ICU parsing live one layer down in the shared @formatjs/intl and @formatjs/icu-messageformat-parser packages in the same monorepo, so react-intl itself is essentially a React-specific adapter over framework-agnostic formatting/parsing engines that also back FormatJS’s Vue and Svelte bindings; a change to the core IntlShape contract would ripple through every Formatted* component and useIntl consumer, but adding a new formatted component is typically a thin new wrapper rather than new formatting logic.
Tech Stack
Written in TypeScript and distributed as an ESM-first package (type: module, an explicit exports map for . and ./server), it targets React as a peer dependency and depends on sibling workspace packages (@formatjs/icu-messageformat-parser, @formatjs/intl, intl-messageformat) inside a large pnpm/Bazel monorepo. Testing runs on Vitest, and releases are automated through release-please in CI, which versions and publishes each FormatJS package independently.
Code Quality
The package carries an extensive unit-test suite covering individual components and hooks, plus dedicated integration tests, and — notably — separate TypeScript type-checking test suites that verify the public type surface itself against multiple supported React versions, a level of type-safety testing uncommon even in well-tested libraries. Source is fully typed, uses explicit invariant-style assertions rather than silently swallowing misconfiguration (a missing IntlProvider throws a descriptive error rather than failing silently), and the monorepo enforces linting, formatting, and pre-commit hook checks across all packages in CI.
API Design
The defining developer-experience choice is offering the same formatting logic through two parallel surfaces: declarative Formatted* components for typical rendering, and an imperative intl.formatX() call via useIntl for contexts where a React element isn’t usable, such as an aria-label or title attribute — avoiding the common need for a second library to cover that gap. Getting started requires little more than wrapping the app in a single <IntlProvider locale messages>, and TypeScript users can further opt into typed message IDs and custom format names for compile-time checking against their own message catalog.
Used by 17 apps in this directory
MLflow
AI Development · Monitoring
The open source AI engineering platform for debugging, evaluating, monitoring, and optimizing production LLMs and agents at scale.
MLflow
AI Development · Monitoring
The open source AI engineering platform for debugging, evaluating, monitoring, and optimizing production LLMs and agents at scale.
Nginx Proxy Manager
Developer Tools · Networking · Security
Manage Nginx reverse proxies and free Let's Encrypt SSL through a beautiful web interface — no Nginx expertise required.
Plasmic
CMS · Design Tools · Low Code Platforms
The open-source visual builder that lets teams design React apps and websites with drag-and-drop while integrating seamlessly with your codebase.
strapi
CMS
Open-source headless CMS that auto-generates REST and GraphQL APIs from your content models, with a fully customizable admin panel you control.
Tolgee
Developer Tools
In-context localization platform that lets developers and translators edit app strings directly in the running application, with AI-powered machine translation and framework SDKs for React, Angular, Vue, and Svelte.
Wire
Collaboration · Team Chat · Video Conferencing
Open source end-to-end encrypted messaging for teams and enterprises — self-host for complete control over your communications and data.
Zulip
Team Chat
Topic-based team chat that brings the structure of email threads to real-time messaging, so distributed teams never lose context across hundreds of concurrent conversations.