WomenPlusPlus / deploy-impact-21-kona-b

Repository for Team kona-b for deploy(impact) running in 2021
https://dots.azureedge.net/
GNU General Public License v3.0
4 stars 5 forks source link

Internationalisation #58

Closed EmilieHumbert closed 2 years ago

EmilieHumbert commented 2 years ago

What I have done:

jacksondieter commented 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:

EmilieHumbert commented 2 years ago

@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.