github nuxt-modules/i18n v10.8.0

32 minutes ago

This release is mostly fixes, along with deprecation warnings ahead of v11 and an experimental option to keep the scroll position when switching locales.

Deprecation warnings

Options and APIs that will be removed in v11 now log a warning when they're used (#4233): during build for options and defineI18nRoute(), and in development for $localeHead(), $getRouteBaseName() and context in the i18n:beforeLocaleSwitch hook. Most of these were only marked as deprecated in the types before, nothing changes in how they behave. The migration guide lists them with their replacements.

Keep the scroll position on locale switch

With a prefixed strategy, switching locale navigates to another route, so Nuxt scrolls to the top of the page. Setting experimental.preserveScrollOnLocaleSwitch: true keeps the scroll position when navigating to the current page in another locale (#4213). If your app has its own scrollBehavior, it needs to check to.meta.scrollToTop as shown in Keep the scroll position. This is opt-in for now and may become the default in v11.


   🚀 Features

   🐞 Bug Fixes

   🏎 Performance

    View changes on GitHub

Don't miss a new i18n release

NewReleases is sending notifications on new releases.