Skip to content

Shipping a multilingual site without duplicating your codebase

Published on May 25, 20265 min readWritten by Rani Prameswari
Locale-prefixed routes mapped out on a whiteboard

Most multilingual sites go wrong in the same place: the URL. Once slugs differ per locale, naive routing forces either duplicated pages or English URLs everywhere.

The routing contract

The default locale is served unprefixed. Every other locale gets a prefix. Slugs are resolved per locale from the database, and each page emits a complete set of hreflang alternates plus x-default.

Tags:NuxtPerformance
Share:

Related articles

Database schema sketch comparing JSON blobs with translation tables
May 17, 20264 min read

Why we model translations as rows, not JSON

A JSON translation blob is convenient until the day you need to find every untranslated heading. Relational translation tables cost one join and return that answer in milliseconds.