Advanced internationalization with Next.js and middleware
Updated
Next.js 12 introduced middleware for handling logic at the CDN level (sometimes called an edge function) before a page loads. This is very powerful and unlocks the potential for static pages to have limited server-side logic. A compelling use case is advanced internationalization and localization.