Closed smolendawid closed 2 years ago
This https://react.i18next.com/ could be a really good solution to your problem! Then you would have as many versions of the index.json as you have languages, and would need to change from using index.json data directly to using something like useTranslation or translate() which are utils that i18n-react gives!
I hadn't planned on adding multilinguel support for now, but if i get the time I'll try adding it to the template!
Thank you for the hint. I'll try to add it, I think adding it to the template would make this great code more close to the ultimate solution.
Describe the solution you'd like I'm looking for a way to add support for a few languages. The way I imagine that is that you can see the flag icon in the header and after clicking it, you can see other flags that will convert the webpage to another language.
There are a few problems with the fact that not all the strings in the page come from
config/index.json
. However the real problem for me is that I don't know how o dynamically change the content of theconfig/index.js
, so that the correct language is reloaded. Should I add another field in theconfig/index.js
or create something likeconfig/index-nl.js
?I'm not experienced frontend developer so I don't really know the conventions.
Thanks