npm next-i18next 16.4.5
v16.4.5

3 hours ago
  • App Router: no "uncached data" error in next dev with cacheComponents: true on the first request - without inline resources, i18next's init() starts loading in a setTimeout(load, 0), and Next.js counted that timer in the first render after the dev server started as uncached data, pointing at await getT() in the root layout. The shared server instance now inits with initAsync: false, so loading starts inside init() and the result is the same, one tick earlier. next build was never affected. Pass i18nextOptions: { initAsync: true } for the old behavior. Side effect: i18next-fs-backend passed via use reads with readFileSync when initAsync is false. i18next < 24 ignores the option. Thanks @rkrisztian (#2353)
  • Docs: cacheComponents in next dev - reloadOnPrerender re-reads the locale files on every render, so leave it off with cacheComponents: true. Reading translations with fs (an fs-based resourceLoader, or public/locales without one) is reported once per language in next dev. An import()-based resourceLoader is not, and next build is the check to trust.

Don't miss a new next-i18next release

NewReleases is sending notifications on new releases.