Back to docs
Recipe
Bilingual content publisher
Ship every article in two languages with zero friction. Meridian handles the routing, SEO tags, and reader preference so you focus on writing.
What you'll build
A content site where every post exists in English and a second language. Visitors land on the correct version automatically based on their browser's Accept-Language header, with a manual toggle always visible.
Ingredients
- Next.js App Router with dynamic
[lang]segments - Middleware that reads
Accept-Languageand rewrites paths - Content stored as Markdown or MDX, one file per language
hreflangtags injected per page for search engines
Steps
- 1Scaffold the
[lang]route group underapp/. - 2Write middleware that detects the preferred language and rewrites
/to/enor/es. - 3Create a language switcher component that persists the choice in a cookie.
- 4Generate
alternatelinks in the document head for every available locale.
Why it matters
Search engines reward properly tagged multilingual sites with higher visibility in regional indexes. Readers stay longer when content appears in their native language. Meridian makes the plumbing invisible so your editorial workflow stays fast.
Ready to build? Start with the quickstart guide →