A Payload site, ready to clone

Placeholder: rounded tiles in soft blue and orange

Languages and translated slugs

One page, many languages

A page is a single document. Its title, slug and blocks are stored per language, so /features, /es/funciones and /ca/funcionalitats are the same page. The editor translates in place instead of keeping linked copies in step.

The default language has no prefix in its URLs. A project can prefix every language instead, and search engines get hreflang links between the translations.

When a translation is missing

A page that is not translated into a language is left out of its menus, its sitemap and its language switcher. If someone opens its URL anyway, the MISSING_TRANSLATION setting decides: a 404 by default, or a temporary redirect to the default language. The demo has a page like that, and so has the blog: Only in English.

.env
LOCALES=en,es,ca
DEFAULT_LOCALE=en
MISSING_TRANSLATION=not-found

Languages, in the demo

Switch language in the header and watch the menus follow.

Open Languages