Prompt variables
The placeholders you can use in page and subtitle translation prompts, and what each one becomes.
With an AI provider, every translation request sends a system prompt and a prompt. You can pick one of the built-in prompts or write your own on Page Translation → Customize page prompts (and Video Subtitles → Custom subtitle prompts for subtitles). Click Copy and customize on a built-in prompt to start from it.
In both fields, variables in double curly braces are replaced before the request goes out.
Page translation
| Variable | Becomes |
|---|---|
{{input}} |
The text to translate |
{{targetLanguage}} |
Your target language |
{{webTitle}} |
The page title |
{{webDescription}} |
The page’s description from its metadata |
{{webContent}} |
The page’s text, cut to the first 2,000 characters |
{{webSummary}} |
A summary of the page, when AI smart context translation is on |
Video subtitles
| Variable | Becomes |
|---|---|
{{input}} |
The subtitle text to translate |
{{targetLanguage}} |
Your target language |
{{webTitle}} |
The page title, usually the video’s title |
{{webDescription}} |
The page’s description from its metadata |
{{videoSummary}} |
A summary of the video, when AI smart context translation is on |
Example
Translate the following text into {{targetLanguage}}.
It comes from an article titled "{{webTitle}}".
Keep technical terms in English. Reply with the translation only.
{{input}}
Tips
- Keep
{{input}}in the prompt; without it there’s nothing to translate. - Several paragraphs often travel in one request, separated by a line with
%%. Duet Translate adds the rules for that to the system prompt by itself, so your prompt only has to describe the translation you want. {{webContent}}and{{webSummary}}make each request longer, so they cost more tokens.- Export and Import move prompts between browsers or share them with others.