When it applies
Localization features only appear for content types defined withlocalized: true in your schema:
__mdcms_default__ locale behind the scenes. The locale switcher does not appear in the editor for these types.
Locale configuration
Locale support is configured inmdcms.config.ts under the locales key:
Non-localized types ignore the locale configuration entirely. The locale
switcher does not appear in their editor, and they are stored under the
internal
__mdcms_default__ locale.Locale switcher
When editing a localized document, a locale dropdown appears in the document editor. The switcher shows:- Existing variants — Locales that already have a translation for this document, displayed as links that navigate directly to that variant
- Untranslated locales — Supported locales that don’t have a variant yet, with a Create option to start a new translation
GET /api/v1/content/:documentId/variants, which returns all locale variants within the same translation group.
Creating translations
1
Open an existing document
Navigate to a localized document in any locale.
2
Open the locale switcher
Click the locale dropdown in the editor.
3
Select an untranslated locale
Choose a locale that shows a “Create” option.
4
Create the variant
A new document is created in the target locale. You can optionally prefill
it from the default locale to use as a starting point for translation.
locale parameter and an optional sourceDocumentId to copy content from an existing variant.
Independence of variants
Each locale variant is a fully independent document:- Own path — Each variant has its own filesystem path (e.g.,
content/blog/en/my-post.mdx,content/blog/fr/my-post.mdx) - Own body — The MDX content is independently editable
- Own frontmatter — Field values are independent across locales
- Own version history — Publishing, version snapshots, and draft revisions are tracked separately per variant
- Own status — One locale can be published while another remains in draft
Translation status in content lists
The content list for localized types includes a Translations column that shows coverage status per document. For example:- 2/4 locales — Two of four supported locales have variants
- 4/4 locales — All locales have variants