i18next / i18next-vue

Internationalization for Vue 2 & 3 using the i18next ecosystem
https://i18next.github.io/i18next-vue/
MIT License
74 stars 8 forks source link

Changes for `i18next-vue` v3 #16

Closed kkuegler closed 1 year ago

kkuegler commented 1 year ago

🚀 Proposed changes for i18next-vue v3

For version 3, we'd like to streamline the API of i18next-vue and lean more on the Composition API. Please leave your feedback below.

[Update 2023-08-10] Release 3.0.0 available

We have released version 3.0.0 and a migration guide with the (breaking) changes.

You are still welcome to leave a comment below.

Proposed (breaking) changes

Your feedback is welcome!

These are all quite big changes if you are relying on them in an existing application. That's why we are looking for your user feedback in this issue as a comment below.

Let us know, which feature you would like to keep, or where you would like some backward compatibility to ease the upgrade process to v3. All of the changes are still up for debate.

Thank you!

kkuegler commented 1 year ago

I talked to some colleagues. They use i18nOptions a lot and almost exclusively to set the keyPrefix for the component. They agree with the general direction of using useTranslation() exclusively for this, but would like a smoother transition, which does not require converting all existing components at once to switch to i18next-vue version 3.

We now have the idea to drop support for i18nOptions messages, but keep supporting the other options under a legacy flag for this plugin. i18nOptions will continue to influence $t for the current component in v3. i18nOptions would no longer influence useTranslation(), which would now use the i18next defaults set in i18next.init() - and of course explicit values (namespace, ...) passed to it.

For the next major version v4 we would then completely drop i18nOptions support. So v3 is a version supporting both, allowing converting components incrementally over to useTranslation().