diff --git a/docs/en-US/next/guides/middleware.mdx b/docs/en-US/next/guides/middleware.mdx index cd000d55..7d17f801 100644 --- a/docs/en-US/next/guides/middleware.mdx +++ b/docs/en-US/next/guides/middleware.mdx @@ -6,7 +6,7 @@ description: Automatic language detection and URL routing based on user preferen Middleware automatically detects user language preferences and redirects them to the appropriate localized version of your site. It uses browser settings, geolocation, and user preferences to serve the right language before any content loads. - + **File location:** Place `proxy.ts` in your project root, at the same level as your `app/` directory - not inside it. `proxy.ts` (Next.js 16+) or `middleware.ts` (Next.js 15 and below) @@ -134,13 +134,13 @@ export const config = { }; ``` - - Test your middleware configuration thoroughly - incorrect matchers can cause infinite redirects or break static assets. + + **Caution:** Test your middleware configuration thoroughly — incorrect matchers can cause infinite redirects or break static assets. ## Next steps - + **See it in action:** The [static site generation example app](https://github.com/gt-examples/static-site-generation) includes a full middleware setup with locale routing — [live preview](https://static-site-generation.generaltranslation.dev).