Customizing the Translation Behavior
An overview of the translation customization mechanisms and the kinds of guidance you can provide to the translation agent.
You can control how the translation agent behaves in your project by using two complementary mechanisms.
Per-Job Prompt vs. agent-instructions.md
- The per-job prompt - Free-form instructions that you enter in
the Instructions field of the New
Translation dialog box when you start a translation job. These instructions
apply only to that job. They are useful for one-time requests, such as asking the agent to
retranslate a topic in a specific way.
Figure 1. Per-Job Prompt in the New Translation Dialog
- agent-instructions.md - An optional file located at .contentfusion/i18n/agent-instructions.md in your project's repository. When present, it applies to every translation job that includes it in the workspace. This is the right place for durable, project-wide guidance, such as terminology, style rules, do-not-translate lists, and any other customization described in this section.
Use the per-job prompt for one-time requests, and use agent-instructions.md for guidance that should be applied consistently across translation jobs.
Referencing Other Files
agent-instructions.md does not need to contain all guidance inline. You can move detailed instructions into separate files, such as a terminology list, a style guide, or a doctype configuration, and reference them from agent-instructions.md, while also telling the agent when each file is relevant. Refer to each file by using a path relative to agent-instructions.md.
Splitting guidance this way does more than keep things tidy. It allows the agent to load only the instructions needed for a specific job instead of loading every instruction for every job. This is a form of progressive disclosure. For example, guidance about adding a newly translated publication to your multilingual book is relevant only when that publication is translated for the first time, and instructions for translating SVG text are not relevant to an incremental job that does not include SVG files. Keeping such guidance in referenced files, and consulting them only when needed, helps keep each job focused on the current task.
Common Use Cases
The following topics describe specific customizations that you can define in agent-instructions.md:
The sections below describe shorter customizations that you can add directly to agent-instructions.md.
Do-Not-Translate Lists
To keep specific strings in their original form (product names, code identifiers, or UI labels that ship untranslated), list them and instruct the agent to leave them unchanged wherever they appear. For example:
Never translate the following strings; keep them exactly as written:
Content Fusion, oXygen, WebHelp, DITA-OT.
Style Guide
To apply your house style, describe it in agent-instructions.md or reference a separate style-guide file. Include the choices that matter for your content, such as tone and register, how to address the reader, and language-specific punctuation or formatting conventions:
Use a formal register and address the reader with the formal second person.
Follow the target language's standard quotation marks. Keep UI labels in
sentence case.
Translating Text Inside SVG Graphics
By default, SVG images are treated as binary assets and copied unchanged into each target language, so the text they contain is not translated. If diagram labels or other text inside your SVG graphics must be localized, you can instruct the agent in agent-instructions.md to also translate the text content of the SVG files referenced from your content. For example:
Always translate the text inside referenced SVG images (for example the
content of <text> and <tspan> elements), leaving all other SVG markup
unchanged.