Skip to content
Searching: All docs

Start typing to search the docs.

Prompt Variables

Variables are placeholders in your prompt text that are automatically filled in at runtime. Use them to make prompts context-aware without rewriting them for every project or language pair.

Language variables – all contexts

These work in Batch Translate, Batch Proofread, and QuickLauncher prompts:

VariableReplaced withExample
{{SOURCE_LANGUAGE}}Full name of the source language, including localeDutch (Belgium)
{{TARGET_LANGUAGE}}Full name of the target language, including localeEnglish (United States)

Segment variables – QuickLauncher only

These are only available in QuickLauncher prompts, because they refer to the specific segment active at the moment you trigger the menu:

VariableReplaced withExample
{{SOURCE_SEGMENT}}Full source text of the active segmentDe uitvinding heeft betrekking op een nieuwe werkwijze...
{{TARGET_SEGMENT}}Full target text of the active segment (your translation so far – may be empty or partial)The invention relates to a novel method...
{{SELECTION}}Text currently selected in the editor (source side preferred; falls back to target side)werkwijze

Project variables – QuickLauncher only

VariableReplaced with
{{PROJECT_NAME}}Trados project name (e.g. Patent_NL_EN_2026)
{{DOCUMENT_NAME}}Active file name (e.g. source_document.docx)
{{SURROUNDING_SEGMENTS}}N source segments before and after the active segment, with actual Trados segment numbers and the active segment marked ← ACTIVE. N is set in Settings → AI Settings → Surrounding segments (default: 5).
{{PROJECT}}All source segments in the document, numbered with their actual Trados segment numbers. In multi-file projects a === File N === header separates each file (Trados restarts segment numbering per file).
{{TM_MATCHES}}Translation memory fuzzy matches (≥70%) for the active segment, showing match percentage, TM name, source text, and target text. If no matches meet the threshold, replaced with “(no fuzzy matches above 70%)”.

Scope: which prompts see which variables

The variables above are only substituted in QuickLauncher prompts. In Batch Translate and Batch Proofread custom prompts, only the two language variables ({{SOURCE_LANGUAGE}} and {{TARGET_LANGUAGE}}) get filled in – any other variable left in the prompt body will be replaced with an empty string.

This isn’t a limitation in practice. The batch flows assemble a richer system prompt automatically, with no variables required:

  • Batch Translate automatically includes source-only document context (when Include document context is on in AI Settings), termbase entries, and language-specific checks.
  • Batch Proofread automatically includes the full bilingual document context (source + target, untruncated), termbase entries, and language-specific checks.

So the right place for your custom prompt content in batch mode is to complement what’s already there – domain-specific guidance, citation discipline, project-specific terminology preferences – rather than try to re-inject document context with {{PROJECT}}.

If you want to see exactly what gets sent to the AI for a batch run – fully assembled, including the auto-injected context – click the 👁 Preview prompt link next to the Translate / Proofread button on the Batch Operations tab. See Batch Operations for details.