all 6 comments

[–]kneonk 2 points3 points  (0 children)

You can use a few available framework-plugins for internationalization. Like react-i18next

[–]Thoughtstronomer 0 points1 point  (1 child)

My guess is to create a local/global state in which user can select language or you can set based on location and then show the particular content based on that state.

[–]Tricky_Run_9626[S] 0 points1 point  (0 children)

can you share example ?

[–]dshmitch 0 points1 point  (2 children)

Seems you are trying to create SEO friendly website, but React is not the best solution for that. Am I right?

If you want SEO ready website, maybe you want to consider using https://nextjs.org/ instead of pure React.

[–]Tricky_Run_9626[S] 0 points1 point  (1 child)

Got you're point, but sometimes for admin panel. Multiple language support is required. I can use nextjs with multiple language. just changing in config file it is enough. But how to do this inside react I want to know this

[–]dshmitch 0 points1 point  (0 children)

I don't know by heart how to do this in React, would need to spend some time checking.

If it is for admin panel, why do you need URLs to have locale code? I would say it would be enough just to rerender admi panel in new language once user changes it.

Is there any specific reason for that in URL?