react-intl: A React wrapper around the FormatJS library, used for localization and?
internationalization.
Example with react-i18next:
npm install react-i18next i18next
import { useTranslation } from 'react-i18next';
function MyComponent() {
const { t } = useTranslation();
return <h1>{t('welcome_message')}</h1>;
}
In this case, t('welcome_message') will fetch the corresponding translation for the
current language set in your app.