Skip to content

chore(deps): bump next-i18next from 15.4.3 to 16.0.7 in /frontend#3233

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/frontend/next-i18next-16.0.7
Open

chore(deps): bump next-i18next from 15.4.3 to 16.0.7 in /frontend#3233
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/frontend/next-i18next-16.0.7

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jun 12, 2026

Copy link
Copy Markdown

Bumps next-i18next from 15.4.3 to 16.0.7.

Release notes

Sourced from next-i18next's releases.

v16.0.7

  • Pages Router: fix duplicate i18next in client bundles — v16 shipped the Pages Router as CJS-only, which forced bundlers to load i18next via its require condition (i18next/dist/cjs) while user code loaded it via the import condition (i18next/dist/esm), producing two copies of i18next in the same bundle. The Pages Router now builds dual ESM + CJS outputs, and the ./pages and ./pages/serverSideTranslations exports declare matching import/require conditions. The server-only filesystem branch of createConfig has been extracted into a separate serverSideConfig module (injected via hook by serverSideTranslations) so createConfig no longer pulls Node built-ins into client bundles. Note: appWithTranslation no longer re-runs the server-side validation/preload during SSR — that work happens once, up-front, inside serverSideTranslations (in practice a no-op since appWithTranslation uses the browser client with pre-loaded resources). #2342

v16.0.6

  • Pages Router: reloadOnPrerender now actually reloads — the option was previously calling reloadResources() on the browser-side i18next instance returned by appWithTranslation (which has no FS backend and is often null during getStaticProps/getServerSideProps). It now reloads on the disk-backed node-side instance, scoped to exactly the locales × namespaces being shipped, so edits to locale files appear without restarting next dev. Gated behind NODE_ENV !== 'production' to keep custom HTTP/locize/chained backends from being refetched on every prerender call. #2123
  • App Router: reloadOnPrerender is now wired up — previously declared in the config types but never consumed. Same dev-only semantics as Pages Router: refetches translations from the configured backend (default FS or use-provided custom backend) before each render in development, deduplicated across getT calls within a single render via React's cache(). No effect in production builds. Note: when using a dynamic import()-based resourceLoader, hot-reload is bundler-dependent and may stall after the first edit because Turbopack/Webpack cache resolved JSON modules across HMR cycles — see the README "Dev tip" for the dev/prod-split pattern that gives full hot-reload.

v16.0.5

  • Pages Router: export missing types from next-i18next/pagesTFunction, I18n, WithTranslation, WithTranslationHocType, and UseTranslation types are now properly re-exported, matching the v15 API surface #2339

v16.0.4

  • TypeScript compatibility with i18next v26 — fixed type error in Pages Router createConfig where i18next v26's readonly preload type was incompatible with the internal config type

v16.0.3

  • New hideDefaultLocale option (App Router) — when enabled, the default language is served without a URL prefix (/about instead of /en/about). Non-default locales keep their prefix (/de/about). Explicit default-locale paths (/en/about) are automatically redirected to the clean URL. Works with basePath too. #2338

v16.0.2

  • Serverless/Vercel: better error when public/locales/ is not available at runtime — the default filesystem backend now catches read failures and shows a clear error message explaining the serverless limitation with a resourceLoader code example #2337
  • partialBundledLanguages + resources — when both resources and partialBundledLanguages: true are provided, the default backend is now correctly kept so it can load additional namespaces not included in the pre-loaded resources

v16.0.1

  • App Router: config.resources now works on the serverresources was typed and documented but ignored at runtime by initServerI18next / getT. The resource backend is now skipped when resources is provided, and the pre-loaded translations are passed directly to i18next.init(). #2336

v16.0.0

BREAKING CHANGES

  • Import paths changed for Pages Router: next-i18nextnext-i18next/pages, next-i18next/serverSideTranslationsnext-i18next/pages/serverSideTranslations
  • Root export is now App Router: The default next-i18next import now exports App Router utilities (defineConfig, normalizeConfig, I18nConfig). Pages Router users must update to next-i18next/pages.
  • Removed i18next-fs-backend dependency: Pages Router server-side loading now uses i18next-resources-to-backend with fs.readFileSync internally. No change needed for users — the behavior is identical.

New Features

  • App Router support — first-class support for Next.js App Router with Server Components and Client Components
    • getT(ns?, options?) — async translation function for Server Components, layouts, and generateMetadata. Returns namespace-typed { t, i18n, lng }.
    • useT(ns?, options?) — translation hook for Client Components. Reads language from [lng] or [locale] URL params automatically.
    • I18nProvider — client-side provider for hydrating server-loaded translations. Supports custom backends via use prop.
    • initServerI18next(config) — one-time server configuration setup
    • getResources(i18n, namespaces?) — extract loaded resources for client hydration
    • generateI18nStaticParams() — helper for generateStaticParams
  • Proxy support (Next.js 16+)createProxy() from next-i18next/proxy for the new proxy.ts file convention. createMiddleware() from next-i18next/middleware remains available for Next.js 14/15.
    • Edge-safe language detection (cookie → Accept-Language → fallback)
    • Locale-in-path routing with automatic redirects
    • Custom header for Server Component language detection
  • basePath option — scope the proxy to a URL prefix (e.g., /app-router) for mixed App Router + Pages Router setups
  • No-locale-path modelocaleInPath: false for cookie-based language without URL prefixes. Use useChangeLanguage() hook for language switching.
  • defineConfig() — type-safe configuration helper
  • Custom backend support — pass any i18next backend plugin (http-backend, locize-backend, chained-backend) via the use config option. The default resource loader is skipped automatically when a custom backend is provided.
  • resourceLoader option — custom async loader function (lng, ns) => Promise<object> for dynamic imports or custom loading logic
  • Server-side singleton caching — translations loaded once and reused across requests. Custom backends benefit from this — no re-fetching per request.
  • nonExplicitSupportedLngs — match 'en' to 'en-US' etc. in language detection

... (truncated)

Changelog

Sourced from next-i18next's changelog.

16.0.7

  • Pages Router: fix duplicate i18next in client bundles — v16 shipped the Pages Router as CJS-only, which forced bundlers to load i18next via its require condition (i18next/dist/cjs) while user code loaded it via the import condition (i18next/dist/esm), producing two copies of i18next in the same bundle. The Pages Router now builds dual ESM + CJS outputs, and the ./pages and ./pages/serverSideTranslations exports declare matching import/require conditions. The server-only filesystem branch of createConfig has been extracted into a separate serverSideConfig module (injected via hook by serverSideTranslations) so createConfig no longer pulls Node built-ins into client bundles. Note: appWithTranslation no longer re-runs the server-side validation/preload during SSR — that work happens once, up-front, inside serverSideTranslations (in practice a no-op since appWithTranslation uses the browser client with pre-loaded resources). #2342

16.0.6

  • Pages Router: reloadOnPrerender now actually reloads — the option was previously calling reloadResources() on the browser-side i18next instance returned by appWithTranslation (which has no FS backend and is often null during getStaticProps/getServerSideProps). It now reloads on the disk-backed node-side instance, scoped to exactly the locales × namespaces being shipped, so edits to locale files appear without restarting next dev. Gated behind NODE_ENV !== 'production' to keep custom HTTP/locize/chained backends from being refetched on every prerender call. #2123
  • App Router: reloadOnPrerender is now wired up — previously declared in the config types but never consumed. Same dev-only semantics as Pages Router: refetches translations from the configured backend (default FS or use-provided custom backend) before each render in development, deduplicated across getT calls within a single render via React's cache(). No effect in production builds. Note: when using a dynamic import()-based resourceLoader, hot-reload is bundler-dependent and may stall after the first edit because Turbopack/Webpack cache resolved JSON modules across HMR cycles — see the README "Dev tip" for the dev/prod-split pattern that gives full hot-reload.

16.0.5

  • Pages Router: export missing types from next-i18next/pagesTFunction, I18n, WithTranslation, WithTranslationHocType, and UseTranslation types are now properly re-exported, matching the v15 API surface #2339

16.0.4

  • TypeScript compatibility with i18next v26 — fixed type error in Pages Router createConfig where i18next v26's readonly preload type was incompatible with the internal config type

16.0.3

  • New hideDefaultLocale option (App Router) — when enabled, the default language is served without a URL prefix (/about instead of /en/about). Non-default locales keep their prefix (/de/about). Explicit default-locale paths (/en/about) are automatically redirected to the clean URL. Works with basePath too. #2338

16.0.2

  • Serverless/Vercel: better error when public/locales/ is not available at runtime — the default filesystem backend now catches read failures and shows a clear error message explaining the serverless limitation with a resourceLoader code example #2337
  • partialBundledLanguages + resources — when both resources and partialBundledLanguages: true are provided, the default backend is now correctly kept so it can load additional namespaces not included in the pre-loaded resources

16.0.1

  • App Router: config.resources now works on the serverresources was typed and documented but ignored at runtime by initServerI18next / getT. The resource backend is now skipped when resources is provided, and the pre-loaded translations are passed directly to i18next.init(). #2336

16.0.0

BREAKING CHANGES

  • Import paths changed for Pages Router: next-i18nextnext-i18next/pages, next-i18next/serverSideTranslationsnext-i18next/pages/serverSideTranslations
  • Root export is now App Router: The default next-i18next import now exports App Router utilities (defineConfig, normalizeConfig, I18nConfig). Pages Router users must update to next-i18next/pages.
  • Removed i18next-fs-backend dependency: Pages Router server-side loading now uses i18next-resources-to-backend with fs.readFileSync internally. No change needed for users — the behavior is identical.

New Features

  • App Router support — first-class support for Next.js App Router with Server Components and Client Components
    • getT(ns?, options?) — async translation function for Server Components, layouts, and generateMetadata. Returns namespace-typed { t, i18n, lng }.
    • useT(ns?, options?) — translation hook for Client Components. Reads language from [lng] or [locale] URL params automatically.
    • I18nProvider — client-side provider for hydrating server-loaded translations. Supports custom backends via use prop.
    • initServerI18next(config) — one-time server configuration setup
    • getResources(i18n, namespaces?) — extract loaded resources for client hydration
    • generateI18nStaticParams() — helper for generateStaticParams
  • Proxy support (Next.js 16+)createProxy() from next-i18next/proxy for the new proxy.ts file convention. createMiddleware() from next-i18next/middleware remains available for Next.js 14/15.
    • Edge-safe language detection (cookie → Accept-Language → fallback)
    • Locale-in-path routing with automatic redirects

... (truncated)

Commits
Install script changes

This version modifies prepare script that runs during installation. Review the package contents before updating.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [next-i18next](https://github.com/i18next/next-i18next) from 15.4.3 to 16.0.7.
- [Release notes](https://github.com/i18next/next-i18next/releases)
- [Changelog](https://github.com/i18next/next-i18next/blob/master/CHANGELOG.md)
- [Commits](i18next/next-i18next@v15.4.3...v16.0.7)

---
updated-dependencies:
- dependency-name: next-i18next
  dependency-version: 16.0.7
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot @github

dependabot Bot commented on behalf of github Jun 12, 2026

Copy link
Copy Markdown
Author

Labels

The following labels could not be found: dependencies. Please create it before Dependabot can add it to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

@dependabot dependabot Bot requested review from Dallas98 and WMC001 as code owners June 12, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants