npm next-i18next 16.3.1
v16.3.1

3 hours ago
  • App Router: changing the language on the client works with i18nextOptions: { preload: [] } — with languages loaded on demand the server ships only the ones it has loaded, and I18nProvider pinned supportedLngs to whatever resources happened to contain, so i18next resolved every other language back to the fallback and client components stayed in the old language. supportedLngs is no longer derived from resources (pass the prop to restrict it), and each new resources prop is merged into the client instance — router.refresh() delivers the language the server just loaded — re-resolving the language when its bundles only just arrived. useChangeLanguage leaves that switch to the provider when the store holds nothing for the target language yet, so i18n.resolvedLanguage no longer lags a switch behind in client components (react-i18next 17.0.14 fixes the same staleness at its source, for the case where an app switches the language itself). #2348

Don't miss a new next-i18next release

NewReleases is sending notifications on new releases.