Closed EmilieHumbert closed 2 years ago
Good job :+1: you could follow this article to change for a better configuration https://levelup.gitconnected.com/learn-how-to-translate-react-with-i18next-a8ec4a8b737d it allows defining languages in a personalized folder like translation/{lang}.json :+1:
@jacksondieter I've taken a look at the guide and the setup seems to be very similar to what I have done (following the official documentation here: https://react.i18next.com/latest/using-with-hooks). The differences seem to be that the guide you linked to is using i18next-xhr-backend which has now been deprecated and replaced by i18next-http-backend. The guide also uses a /translations/ directory rather the /locales/ directory suggested by the documentation.
Did you mean that I should only use one file instead of a directory with namespaced files? I think it will be easier to manage in separate files for each page.
What I have done: