ttag-org / ttag

:orange_book: simple approach for javascript localization
https://ttag.js.org/
MIT License
338 stars 41 forks source link

Switch language on-the-fly #198

Closed alp82 closed 4 years ago

alp82 commented 4 years ago

I am loading translations dynamically (not precompiled). The user can choose display language in the application. I would like to apply translations without reloading the whole page.

I tried with calling useLocale() but it didn't update currently shown components.

Is it somehow possible?

alp82 commented 4 years ago

I seem to have made a mistake with my first approach. It seems to work just fine. I suspect that i used translations before setting a language with useLocale. Closing this.