File Types
-
.MD
-
.MARKDOWN
-
.MDX
Import Options
-
Choose which Markdown dialect the parser uses when importing the file. This also affects which characters are automatically escaped/unescaped on import and export.
-
Parses base Markdown structure only (headings, paragraphs, lists, basic emphasis).
-
Parses using the PHP Markdown Extra / Python-Markdown "Extra" dialect, adding support for tables, definition lists, footnotes, abbreviations, and attribute lists.
-
Parses using the GitHub Flavored Markdown (GFM) spec, adding support for tables, task lists, strikethrough, and autolinks.
-
Parses the file as MDX: Markdown plus JSX components, JSX expressions (
{...}), and ESMimport/exportstatements. Tables, task lists, strikethrough, and autolinks work as in GitHub Flavored Markdown. Indented code blocks and angle-bracket autolinks (<url>) are not supported, since MDX uses indentation to nest components and does not parse those constructs.MDX is Markdown extended with JSX, so the content can embed components and JavaScript expressions (for example, in documentation built with Docusaurus or Next.js). The MDX filter is never selected automatically: it must be selected in the file import settings, both for .MDX files and for .MD files that contain MDX syntax. There is no detection by file extension or content.
Note
MDX support must be enabled for your organization. If MDX is not available in the list, contact your Customer Success Manager or Phrase Support.
Important
Switching an existing project from another Markdown filter to MDX changes how the content is segmented. Expect a one-time drop in translation memory leverage after the switch.
-
-
Starts a new segment at each hard line break.
-
Preserves the same whitespace structure in the target document (e.g. spacing, newlines, etc.).
-
Processes the YAML front matter at the top of the file. When selected, .YAML import settings are applied.
-
Extracts the content of code blocks for translation. With the MDX filter, this also applies to fenced code blocks nested inside JSX components (for example, inside
<CodeGroup>). -
When this option is selected, code elements are imported as single Phrase TMS tags.
-
Makes URLs available for translation.
-
Apply regular expressions to convert specified text to tags.
Important
Issues with tags are a common cause of export errors. Always ensure tags and formatting are correct before exporting files by running quality assurance checks.
-
Define the elements in the file to be converted into tags.
-
Define sections in the file that should not be imported.
Example:
Element name:
notrans.Code:
<notrans>Chrysler</notrans> entered three factory-prepared <notrans>Dodge Shadows</notrans> to the event in 1985. All three vehicles retired in the first day of the three-day <notrans>Olympus</notrans> rally.Result: Chrysler は、1985年に工場で準備された3台の Dodge Shadows に参加しました。3台の車両はすべて3日間の Olympus ラリーの初日にリタイアしました。
-
A list of characters that shouldn't be escaped in the completed file (for instance,
#,-,[,<,\,`,.With the MDX filter, both
<and{are escaped by default in translated text, because an unescaped<or{in the target would otherwise break the MDX syntax. Add them here only if the raw, unescaped character is specifically needed in the output.
MDX-Specific Options
The following four options are available only when MDX is selected in .
-
Define additional JSX tag/attribute pairs to make them translatable, using the same
tag/attributeformat as the setting of the HTML filter. For example,Figure/titletranslates thetitleattribute only on theFigurecomponent, whiletitle(unscoped) translates it on every tag.Custom components (tag names starting with an uppercase letter, such as
<Figure>) have no translatable attributes by default, so list them here explicitly. Lowercase/HTML-style tags (<img>,<a>, etc.) already have standard attribute defaults. -
Enabled by default.
Applies the standard HTML translatable-attribute defaults (for example,
alton<img>,titleon<a>) to lowercase/HTML-style tags, in addition to anything listed in . Custom components never receive these defaults, regardless of this setting. Their attributes are translatable only when added to .When disabled, only the attributes listed in are translatable, even on lowercase tags.
-
Enabled by default.
Sets whether the text inside a JSX component is translatable by default.
-
When enabled: Text inside any component (for example,
<Tabs>,<Note>) is translatable, unless the component is listed in . -
When disabled: Text inside components is not translatable, unless the component is listed in .
-
-
A comma-separated list of component names that get the opposite of the setting.
A component listed here is switched as a whole: its entire content, including any components nested inside it, follows the override and is not evaluated individually. When the override makes a component non-translatable, its content is preserved exactly as written. Use this list to:
-
exclude a few non-prose components (for example,
CodeGroup,Mermaid) when is enabled, or -
allow-list a few prose-bearing components when that setting is disabled.
-
How JSX Content Is Handled
This applies when MDX is selected in .
-
JSX tags (
<Component>,<Component attr="value" />) and tag and attribute names are never translatable. Only element content and the attribute values explicitly configured are translatable. -
Expressions in curly braces (
{...}), JavaScript expressions, spread attributes ({...props}), and comments ({/* comment */}) are never translatable. They are preserved exactly as written, wherever they appear: in attributes, inline in text, or on their own line. -
importandexportstatements are always excluded from translation, wherever they appear in the file.