Skip to content

Conversation

konstantin-lukas
Copy link

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

The nuxt-i18n docs state that you are not supposed to directly change the value of locale. However, this was the case in the code example, because locale was passed to v-model which caused undesirable behavior. Specifically, this changed the locale before it was loaded from the server. This would result in a console error and the translation key rendering instead of the translation for a brief moment. The watch isn't strictly necessary, I suppose, but nice to ensure the state of locale and selectedLang always match.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

The nuxt-i18n docs state that you are not supposed to directly change the value of locale. However, this was the case in the code example, because locale was passed to v-model which caused undesirable behavior. Specifically, this changed the locale before it was loaded from the server. This would result in a console error and the translation key rendering instead of the translation for a brief moment.
@github-actions github-actions bot added the v4 #4488 label Oct 5, 2025
Copy link

pkg-pr-new bot commented Oct 5, 2025

npm i https://pkg.pr.new/@nuxt/ui@5145

commit: b4999d1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v4 #4488
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant