This article shows how to set up a react app for localization using react-i18next and i18next. The information here is mostly taken from the react-i18next site at the Step By Step Guide and Using hooks with react-i18next. The complete code is available at https://github.com/gwynsoft/react-with-localization-base
Starting from a base create-react-app setup (See Setting Up Nvm, Node.js And Create-React-App), first, install react-i18next and i18next: