1
1
12332112021-03-29 23:50:57
JavaScript
1233211, 2021-03-29 23:50:57

How to translate a react site into multiple languages?

How to correctly translate a site on react with static content (there is not a lot of content and new ones will not be added) into several languages? All translations are available. As I understand it, you need to create several files like en.json, ru.json, and so on, and there for each button, for each sentence on the site, write the texts you need and, in contrast to which language is selected on the site, display the desired text. But how to determine which language the user has chosen? Where to store his choice? In localstorage or in url?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Ineshin, 2021-03-29
@1233211

https://react.i18next.com/legacy-v9/step-by-step-guide

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question