Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 1, 2024 via pnpm

react-i18next 13.2.2

Internationalization for react done right. Using the i18next i18n ecosystem.
Package summary
Share
0
issues
1
license
9
MIT
Package created
12 Dec 2015
Version published
3 Sep 2023
Maintainers
2
Total deps
9
Direct deps
4
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
9 Packages, Including:
@babel/runtime@7.24.5
html-parse-stringify@3.0.1
i18next@23.11.3
js-tokens@4.0.0
loose-envify@1.4.0
react-i18next@13.2.2
react@18.3.1
regenerator-runtime@0.14.1
void-elements@3.1.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

4
All Dependencies CSV
β“˜ This is a list of react-i18next 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
@babel/runtime7.24.5256.12 kBMIT
prod
html-parse-stringify3.0.110.42 kBMIT
prod
i18next23.11.3620.48 kBMIT
prod peer
react18.3.1310.65 kBMIT
prod peer

Visualizations

Frequently Asked Questions

What does react-i18next do?

React-i18next is an internationalization framework for React applications, which is part of the larger i18next ecosystem. This popular npm package assists developers in effectively managing translations within their React projects, thus making them accessible to a global audience. Leveraging the power of i18next, react-i18next simplifies the complex task of translating your application into multiple languages. It supports standard web i18n features such as plurals, context, interpolation, and formatting, as well as the more advanced features i18next provides.

How do you use react-i18next?

You can begin using react-i18next by installing it via npm. If you're using the most recent version (version 10 or higher), you can run npm i react-i18next.

For the legacy version (version 9), you need to run npm i react-i18next@legacy.

After installing the package, you can then import it into your application:

import { useTranslation } from 'react-i18next';

To use the useTranslation hook to translate text, you should first define your translations. Then in your React component, you can use the t function to access these translations, like so:

import React from 'react';
import { useTranslation } from 'react-i18next';

function MyComponent() {
  const { t } = useTranslation();

  return <h1>{t('Welcome to React')}</h1>;
}

You can also use the <Trans> component to embed dynamic content within your translations:

import React from 'react';
import { Trans } from 'react-i18next';

function MyComponent() {
  return (
    <Trans i18nKey="userMessagesUnread" count={count}>
      Hello <strong title={t('nameTitle')}>{{name}}</strong>, you have {{count}} unread message. <Link to="/msgs">Go to messages</Link>
    </Trans>
  );
}

This simple syntax allows for efficient and manageable localization of your React applications.

Where are the react-i18next docs?

The react-i18next documentation is available at react.i18next.com. The docs cover in detail how to effectively use the package for internationalizing your React applications. The general i18next documentation is also available at www.i18next.com. More specific documentation changes can be presented through pull requests at their respective GitHub repositories. Learning resources and community examples can also be found in the documentation, providing a thorough understanding of how to achieve efficient localization with React and react-i18next.