RE

React I18next

react-i18next

Internationalization for react done right. Using the i18next i18n ecosystem.

Internationalization
i18next
internationalization
i18n
translation
localization
l10n
globalization
react
reactjs
react-i18next
Stars
10k
Weekly
0
Open issues
1
Bundle
~60 kB

Installation

npm install react-i18next

Code example

import { useTranslation } from "react-i18next";

export function Example() {
  const { t, i18n } = useTranslation();
  return (
    <div>
      <p>{t("welcome")}</p>
      <button type="button" onClick={() => i18n.changeLanguage("es")}>
        ES
      </button>
    </div>
  );
}

Pros & cons

Pros

  • Actively maintained by Jan Mühlemann
  • 0 weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~60 kB to your bundle
  • Not supported in React Native
  • 1 open issues on GitHub

FAQs

Alternatives & similar libraries