Open klokie opened 7 years ago
The first step would be to re-enable react-intl, which is now disabled by default. After that I think it wouldn't be too hard. The part that controls the active language is the App.jsx
component, so you should be able to replace that using replaceComponent
.
As for how to control the language in practice, I'd probably recommend handling that through Redux. My Redux is a bit rusty so I generally just follow this model: http://docs.vulcanjs.org/redux.html
It's not clear to me what would be required to switch language (locale?) at runtime, e.g. by offering a menu of supported languages in the top nav bar.
It looks to me like the
locale
is hard-coded into thesettings
file – how much work would it be to adapt that to an array of supported locales? I also noticed that Telescope/Nova may have used tap-i18n, which might have provided such a solution, but no longer. Is there something similar in the works using react-intl?Thanks for any guidance you can provide.