In this project I want to show you how we can integrate the i18next library with React thanks to react-i18next to add translations to our application.
The library react-i18next also has its own hooks (useTranslation), something that comes as an addition now that functional components are the trend in development with React.
Integrating i18next in a project developed with React thanks to react-i18next library.
Using the hook useTranslation to translate texts.
Implementing a language switcher thanks to i18next object.
Asynchronously loading the translation files, separating them in different files.
Use yarn start to run the app in the development mode and open http://localhost:3000 to view it in the browser.
