nuxt-modules / i18n

I18n module for Nuxt
https://i18n.nuxtjs.org
MIT License
1.71k stars 478 forks source link

useLocaleHead doesn't change or its not reactive. #2775

Closed pmnzt closed 7 months ago

pmnzt commented 7 months ago

Discussed in https://github.com/nuxt-modules/i18n/discussions/2765

Originally posted by **jesspinklet** February 8, 2024 ![image](https://github.com/nuxt-modules/i18n/assets/77070946/cb04397f-cc81-492a-b834-e0bbd8f9e4fa) I have this in my app.vue file after upgrading to 8.0.1 or anything else above from 8.0.0 version, the lang and dir attribute is not getting updated when i set locale from useI18n() unless I change page. I read the docs and change logs but not sure if am I missing something or not
jesspinklet commented 7 months ago

Based on this: https://github.com/nuxt-modules/i18n/issues/2771 In order to set locale, we have to import and use setLocale() instead of locale