Skip to content

Releases: i18nexus/next-i18n-router

v5.1.0

27 Dec 20:55
Compare
Choose a tag to compare
  • Add forwarding of request headers in i18nRouter

v5.0.2

20 Nov 20:06
Compare
Choose a tag to compare
  • Fixes RangeError thrown by @formatjs/intl-localematcher when an invalid accept-language header is present on request (#25)

v.5.0.1

21 Oct 00:20
Compare
Choose a tag to compare
  • Updates changelog and examples version to v5.0

v5.0.0

21 Oct 00:10
Compare
Choose a tag to compare

To encourage best practices, we have removed the 'rewrite' routing strategy and require use of a dynamic segment.

Breaking Changes

If you are currently using routingStrategy: 'dynamicSegment', no changes are required aside from removing the routingStrategy option from your config.

  • routingStrategy config option removed as now there is only one option ('dynamicSegment')
  • Dynamic segment for the path locale now required
  • Removed currentLocale helper function. This function used a header set in the middleware to get the current locale, but this was undependable due to middleware response caching. Reading headers in server components also disables use of SSG. To get the current locale in server components, you can now just use the page params.

v4.1.2

07 Oct 00:11
Compare
Choose a tag to compare

v4.1.1

05 Oct 03:40
Compare
Choose a tag to compare
  • Minor updates to README adding instructions for setup with i18next.

v4.1.0

02 Oct 18:03
Compare
Choose a tag to compare
  • Fix bug in which rewrites did not have an opening /, causing pathnames with more than 2 segments to return 404's (#23)

v4.0.0

22 Sep 23:07
Compare
Choose a tag to compare

Breaking Changes

  • i18nRewriter has been removed as it is no longer needed. 🎉
  • i18nRouter no longer accepts an existing response as a third argument.

New Features

  • Adds new option named routingStrategy that can be set to "rewrite" (default) or "dynamicSegment". The "rewrite" strategy is the same functionality as v3. The "dynamicSegment" strategy allows for using the current locale as a dynamic segment, enabling usage of generateStaticParams for static generation of all languages at build time. Read more here.

v3.3.0

20 Sep 04:04
Compare
Choose a tag to compare

TypeScript optimization:

  • Return undefined instead of null in useCurrentLocale hook
  • Return undefined instead of null in currentLocale helper

v3.2.0

01 Sep 00:26
Compare
Choose a tag to compare
  • Update: Adds optional third argument of type NextResponse to i18nRouter to allow for developers to use a previously generated response (#8)
  • Fix: The original request's search parameters are now persisted when redirecting to another language (#13)