github i18next/next-i18next v16.4.11

one hour ago
  • App Router: a language tag with script and region matches a supported script code - the proxy went from the full code straight to the bare language, so with supportedLngs: ['en', 'zh-Hans', 'zh-Hant'] a browser sending zh-Hant-TW got en, /zh-Hant-TW/x redirected to /en/zh-Hant-TW/x, and with nonExplicitSupportedLngs both ended up on zh-Hans. With zh also supported it got zh. The script part (zh-Hant) is now tried before the language part, as in i18next. Thanks @SudeepGowda55 (#2357)
  • App Router: the cookie fallback in getT() matches like the proxy - when the proxy did not run (no x-i18next-current-language header), the language cookie only counted if it was in supportedLngs exactly, or with nonExplicitSupportedLngs by its language part. Now it goes through the proxy's matching: case-insensitive, zh-Hant-TW to zh-Hant and de-AT to de.

Don't miss a new next-i18next release

NewReleases is sending notifications on new releases.