github i18next/next-i18next v16.1.1

2 hours ago
  • App Router: proxy rewrites and redirects keep Next's basePath — targets were built with new URL(path, req.url), which drops the base path that Next keeps inside req.nextUrl, so with basePath: '/nxt' in next.config every locale redirect, and every rewrite in hideDefaultLocale and 'internal' mode, landed outside the app and 404'd. Targets are now built from req.nextUrl.clone(), which also preserves trailingSlash, and the referer-based cookie persistence strips the base path before looking for a locale. The basePath option in the i18n config is unrelated: it is the route-folder prefix for mixed-router setups (app/app-router/[lng]/…). #2345
  • App Router: ssrBackend prop on I18nProvider — opt in to applying the backends from use during the server render pass as well. With i18nextOptions: { react: { useSuspense: true } } a namespace missing from resources suspends into the nearest <Suspense> boundary and streams in, so only the namespaces a route renders need to be in the HTML and the rest load on demand without hydration mismatches. Only for timer-free backends such as i18next-resources-to-backend with dynamic imports; the 16.0.11 reasoning still applies to http/locize backends. #2345

Don't miss a new next-i18next release

NewReleases is sending notifications on new releases.