If you need to use i18next outside of React, pick the right approach:
- ✔ Ensure initialization before calling t() (await initPromise).
- ✔ Pass t() down from React if you want to keep it reactive.
- ✔ Store translations in an object and update them when the language changes, etc.
Read more about it [here][1].
[1]: https://www.locize.com/blog/how-to-use-i18next-t-outside-react-components
If you need to use i18next outside of React, pick the right approach:
- ✔ Ensure initialization before calling t() (await initPromise).
- ✔ Pass t() down from React if you want to keep it reactive.
- ✔ Store translations in an object and update them when the language changes, etc.
Read more about it [here][1].
[1]: https://www.locize.com/blog/how-to-use-i18next-t-outside-react-components