Prompt
How do I manage multilingual content in a headless CMS?
Latest observation
Managing multilingual content in a headless CMS usually comes down to three things: content modeling, localization workflow, and delivery strategy. Here’s a practical approach.
1) Choose a localization model
Most headless CMSs support one of these patterns:
A. Separate entry per locale
- Create one content entry for each language.
- Link them together with a shared translation group ID.
- Example:
About Usin English, French, and German are separate items.
Pros: easy to translate, easy to publish independently
Cons: more entries to manage, harder to keep structure aligned
B. Single entry with localized fields
- Store all languages in one entry.
- Example:
title.en,title.fr,title.de
Pros: simpler for small content sets, easier to keep fields in sync
Cons: can get messy with many locales, workflow can be clunky
C. Hybrid approach
- Use separate entries for major page/content types.
- Use localized fields for short text like labels, CTAs, and metadata.
This is often the most practical option.
2) Define locale strategy early
Decide:
- Which locales you support
- Which is the default locale
- Whether some locales are fallback-only
- Whether you use regional variants like
en-USvsen-GB
Good practice:
- Keep locale codes consistent with standards like
en,fr,de,es-MX - Set a clear fallback chain, e.g.
fr-CA -> fr -> en
3) Model content for translation
Design content types with localization in mind:
- Mark fields as localizable when appropriate
- Keep reusable content components translatable if needed
- Avoid putting too much text inside deeply nested JSON unless your CMS handles it well
Typical fields to localize:
- Title
- Body copy
- SEO title/description
- Button labels
- Alt text
- Navigation labels
Typical fields to keep global:
- IDs
- Slugs only if your routing requires locale-specific URLs
- Dates
- Internal reference fields
- Asset references, unless image text differs by locale
4) Plan translation workflow
A multilingual CMS works best when translation is a process, not just a field.
Common workflow:
- Content created in source language
- Mark as ready for translation
- Send to translators or translation management system
- Import translated content
- Review, approve, publish
Useful features:
- Translation status per locale
- Missing translation indicators
- Source-to-target field mapping
- Versioning and approval states
If your CMS supports it, integrate with a TMS like Lokalise, Phrase, Crowdin, or Smartling.
5) Handle slugs and URLs carefully
Decide whether each locale gets its own slug:
/en/about/fr/a-propos
Best practices:
- Localize slugs for user-facing languages
- Keep a stable internal reference to the page
- Avoid relying on slug alone as an identifier
If your CMS or frontend supports it, store:
- canonical content ID
- locale
- localized slug
- fallback slug or canonical URL
6) Support fallback logic in the frontend
If a translation is missing:
- Show fallback language content
- Or hide the content until translated
- Or display a partial locale and indicate missing sections
Common pattern:
- Try requested locale first
- Then fallback locale
- Then default locale
Make sure this behavior is intentional so users don’t see mixed-language pages unexpectedly.
7) Localize media and metadata
Multilingual content is more than text.
Also consider:
- Image alt text
- PDF downloads
- Video subtitles/captions
- Structured data / schema markup
- Open Graph titles/descriptions
- Navigation menus
- Date/time formatting
- Currency and units
Some assets may be shared globally, while others need locale-specific versions.
8) Make previews locale-aware
Editors should be able to preview:
- the exact locale they’re editing
- locale-specific routes
- translated navigation and related content
If preview only shows the default locale, editors will miss layout or copy issues in translated pages.
9) Keep content and code separate
In your frontend:
- Don’t hardcode user-facing strings
- Use i18n libraries for app UI text
- Fetch CMS content by locale
- Format dates, numbers, and currencies according to locale
This keeps application UI and CMS content aligned but independently manageable.
10) Audit and maintain translations
Over time, source content changes and translations drift.
Useful maintenance practices:
- Track translation completeness
- Detect outdated translations when source changes
- Lock approved translations if needed
- Regularly audit missing or stale localized fields
Example workflow
For a marketing site:
- Global homepage content stored as one content model
- Each locale has its own entry for page copy
- Shared components like CTA labels are localized fields
- Slugs differ by locale
- Frontend uses locale fallback to English
- Translation tool syncs with the CMS
Common mistakes to avoid
- Translating UI in the CMS instead of the app, or vice versa
- Using one giant content blob with all locales mixed together
- Forgetting to localize metadata and alt text
- Not planning slugs and routing early
- No fallback strategy
- No translation status or editorial workflow
If you want, I can also give you:
- a recommended data model for multilingual content,
- a locale routing strategy for a frontend like Next.js, or
- a comparison of multilingual features in common headless CMSs.