.mdx.
Source file
Save this example aslocales/en-US/messages.mdx.
Configure your files
Use thisi18n.yml for the example, or add its file mapping to your existing bucket.
See path templates for other layouts.
Translate
Install the CLI and setOPENAI_API_KEY in your
project’s .env.local or shell. You can also configure another
AI provider.
Behavior and limitations
- Uses the MDX parser to translate prose while preserving JSX structure and expressions.
- Frontmatter and fenced code blocks stay unchanged. Keep executable content in expressions or code blocks.
- Review rendered output after translating pages with custom components. Support for MDX does not mean arbitrary component properties are translation messages.
Next steps
- Check translations before committing generated files.
- Local translation workflow explains repeat runs.
- Browse all file formats.

