Locale routing (optional catch-all, matcher, 308 canonical)
Generated from
mcp/patterns.registry.json— do not edit by hand; change the registry and runbun run patterns:build.
Index card — the docs below are the canonical explanation; deep-tier pattern pages additionally carry invariants and emulation notes.
Category: Internationalization (i18n) · Tier: light · Risk: low — routing/redirect logic only
URL-based locale routing using an optional [[locale=locale]] catch-all segment and a param matcher, with the unprefixed default locale (en) 308-redirected from /en/* to keep canonical URLs.
When to use: Use when adding or reasoning about localized routes so URLs stay canonical and SEO-safe across locales.
Docs
Code
Proof
Machine-readable record: i18n-locale-routing in mcp/patterns.registry.json.