'React / Rails / I18next change language in URL or refresh server-side props
I'm using React with Rails. I get some props from a React controller when rendering the page initially. When changing the language on the frontend (I18next), we refresh some components by calling our API.
However, some other translatable data comes from the server-side props passed on the initial page load.
What I would now want, is when I change the language, I reload the server-side props (or reload the whole page). I was thinking I can add ?locale=en to the URL, that that would trigger a refresh, but that doesn't seem to work.
Is there a way to reload all backend props, but not refresh the whole page? If not, is there a way to trigger a complete page refresh?
Thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
