i18nexus / next-i18n-router

Next.js App Router internationalized routing and locale detection.
MIT License
262 stars 18 forks source link

not-found and error pages not working #52

Closed VugarAhmadov closed 9 months ago

VugarAhmadov commented 9 months ago

After updating to latest version of nextjs and next-i18n-router my custom not found and error pages not working anymore i checked the example with react-intl and not-found page not working there too

VugarAhmadov commented 9 months ago

found the workaround. created [...not-found/page.tsx inside [locale] folder and wrote this code

import { notFound } from "next/navigation";

export default function NotFoundCatchAll() { notFound(); }

hence, closing this issue

i18nexus commented 9 months ago

Yes, not-found pages have to be done this way in dynamic segments in Next 13+. More detail can be read here in this previous issue: https://github.com/i18nexus/next-i18n-router/issues/36