Today, I will show you how to translate the text and date in your React.js application.
First of all, you must install some dependencies:
yarn ...
For further actions, you may consider blocking this person and/or reporting abuse
Thank you for your article Oksana!
How do you manage the fact that translations files may be cached by the browser and therefore if you publish an updated translation file, let's say
public/locales/ru/translation.json
, the browser may still continue to use an outdated cached version ofpublic/locales/ru/translation.json
.Did you find a solution for that as well?
Hi Oksana! Great solution, thank you! I'd like to ask you about an issue I have whenever I run it...
It outputs a red screen, with white fonts and the following error:
“A React component suspended while rendering, but no fallback UI was specified. Add a component higher in the tree to provide a loading indicator or placeholder to display”
I don't understand where does it come from, since the
<Suspense/>
component has already been filled with the fallback:Thank you in advance Oksana!
Thank you for the summary. I found that those i18n-libraries are not enough to keep translation-files in sync, which is why I wrote "attranslate" as an additional tool for file-synchronization: github.com/fkirc/attranslate you can give it a try if you are seeking a free solution
Thanks for sharing the post, its content is very valuable.
Beginner web developer? I've read a lot of solutions for i18next and you have been the only one that has made my app be translated correctly, all very clear. You are agoddess!!! Thanks a lot!!!
Wow! Thanks for your comment! I’m very happy that you found this article helpful
Cool, now I have something to play with on the weekend.
Thank you Oksana! It works like a charm!
The simplest just to the point explanation I've seen so far about i18next. Thx a lot for sharing this. i18next should put this article in their website as Getting Started.
i18next-xhr-backend is deprecated, i18next-http-backend can be used now.
i.e. dev.to/adrai/how-to-properly-inter...
It works fine with props? I mean suppose I have a header component that receive a prop title to render some things like this.
I read and integrated follow i18next documents but my project failed. Since I read your post and follow it, I very surprise. I got it. You are my idol. Thank you so much!
Thank you, for me es better i18n than react-intl, works fine and it's super easy to config
Wonderful. Able to set up our entire app in just a week..!! Thanks a lot :)
Thanks Oksana, nice article. Could you explain why locales should be placed in the public folder? Thanks