React Components for internationalization.

Usage no npm install needed!

<script type="module">
  import reactIntlWithDataMessageId from '';


React Intl with data-message-id

Same as React Intl but rendering data-message-id to translations


// will render
<span data-message-id="app.greeting">Hello</span>

Modified support for function-as-child pattern (render props)

  defaultMessage="Hello, <b>World</b>!"
 {({props, formattedHTMLMessage}) => (
   <i {...props} dangerouslySetInnerHTML={{__html: formattedHTMLMessage}} />

// will render
<i data-message-id="app.HtmlGreeting">
  Hello, <b>World</b>!

Nice introduction to react-intl: Nice introduction to react-intl

Content management using react-intl: Content management using react-intl

Internationalize React apps. This library provides React components and an API to format dates, numbers, and strings, including pluralization and handling translations.

npm Version Build Status Dependency Status


React Intl is part of FormatJS. It provides bindings to React via its components and API.

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


React Intl's docs are in this GitHub repo's Wiki, Get Started. There are also several runnable example apps which you can reference to learn how all the pieces fit together.

(If you're looking for React Intl v1, you can find it here.)


  • Display numbers with separators.
  • Display dates and times correctly.
  • Display dates relative to "now".
  • Pluralize labels in strings.
  • Support for 150+ languages.
  • Runs in the browser and Node.js.
  • Built on standards.


There are several runnable examples in this Git repo, but here's a Hello World one:

import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import {IntlProvider, FormattedMessage} from 'react-intl';

class App extends Component {
    constructor(props) {
        this.state = {
            name       : 'Eric',
            unreadCount: 1000,

    render() {
        const {name, unreadCount} = this.state;

        return (
                    defaultMessage={`Hello {name}, you have {unreadCount, number} {unreadCount, plural,
                      one {message}
                      other {messages}
                    values={{name: <b>{name}</b>, unreadCount}}

    <IntlProvider locale="en">
        <App />

This example would render: "Hello Eric, you have 1,000 messages." into the container element on the page.

Pluralization rules: In some languages you have more than one and other. For example in ru there are the following plural rules: one, few, many and other. Check out the official Unicode CLDR documentation.


Let's make React Intl and FormatJS better! If you're interested in helping, all contributions are welcome and appreciated. React Intl is just one of many packages that make up the FormatJS suite of packages, and you can contribute to any/all of them, including the Format JS website itself.

Check out the Contributing document for the details. Thanks!


This software is free to use under the Yahoo Inc. BSD license. See the LICENSE file for license text and copyright information.