MDX format (.mdx)
The MDX format reads .mdx files — CommonMark Markdown extended with
JSX components, ESM import/export statements, and {expression} braces —
the authoring format of modern documentation and content sites (Docusaurus,
Next.js, Astro).
Translatable Markdown prose is extracted using the same machinery and
configuration as the Markdown format (paragraphs, headings, list items,
link/image text, inline emphasis). MDX-specific constructs — ESM statements,
JSX tags with their attributes and children, top-level {expression} blocks,
and GFM tables — are preserved byte-for-byte and never translated, with
component names, attribute values, import paths, and expressions left
untouched. Read→write reproduces real-world .mdx exactly when nothing is
translated; the reader self-verifies each prose region and falls back to
opaque preservation if a region would not round-trip byte-faithfully.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
codeFinderRules | array | Regex patterns that match inline codes within translatable text. | |
frontMatterKeys | array | Front matter keys to extract when translateFrontMatter is on (empty = every scalar value). Set the prose-bearing keys, e.g. title and description. | |
translateBlockQuotes | boolean | true | If true, blockquote content is translatable. |
translateCodeBlocks | boolean | false | If true, fenced and indented code blocks are translatable. If false, emitted as non-translatable data. |
translateFrontMatter | boolean | false | If true, YAML front matter values are translatable. If false, emitted as non-translatable data. |
translateHTMLBlocks | boolean | false | If true, raw HTML blocks are translatable. If false, emitted as non-translatable data. |
translateImageAlt | boolean | true | If true, image alt text is included in translatable content. |
translateURLs | boolean | false | If true, link and image URLs are translatable. |
useCodeFinder | boolean | false | Enable regex-based inline code detection within translatable text. |
Configure these parameters interactively and copy the YAML on the Format Reference.
Processing notes
Markdown prose is translatable; ESM, JSX (including children, in this version), expressions, and GFM tables are opaque and preserved verbatim.
Configuration parameters mirror the Markdown format (e.g. frontmatter and code-block handling).
Detection is by the unique
.mdxextension.
← Back to the Format Reference