Gå til hovedinnhold

Translate tool

The Translate tool translates untranslated block content. A single --provider selects the backend: a large-language-model provider (Anthropic, OpenAI, Gemini, Azure OpenAI, Ollama) or the keyless offline demo provider. Classic machine-translation engines are not built in; a plugin can register one, and it is then selected the same way. The result is written as the target text, with an alternate-translation annotation recording the originating provider. A target language is required, and credentials are required for hosted providers (local Ollama and the offline demo need none).

Blocks that contain inline codes are sent through a placeholder-preserving prompt so tags survive translation, then reconstructed from the response. Blocks can be translated one at a time or grouped into batches sent in a single structured call; batches can run concurrently. When run with a session cache, already-translated targets are reused and fresh translations are written back, so repeat runs skip work already done.

IDtranslate
SourceBuilt-in
Categorytranslation
Cardinalitybilingual
Requirestarget-language, credentials
Tagstranslation, l10n

Parameters

ParameterTypeDefaultDescription
enginestringllmTranslation engine: an AI model or a machine-translation provider
apiKeystringAPI key for the AI provider
batchConcurrencyinteger1Number of concurrent batch calls (0 or 1 = sequential)
batchingstringautoHow many blocks share one LLM call
contextstringkeyWhat the model is told about a block besides the block itself
contextWindowinteger2Blocks either side to send as reference (with context: neighbours)
instructionstringExtra guidance for the model while translating (e.g. 'informal register; keep product names in English')
modelstringAI model name
providerstringanthropicAI provider
skipMatchedbooleanfalseSkip blocks that already have a target translation

Configure it live

Configuration
Loading form…

Examples

Translate with Anthropic

Translate untranslated blocks using an Anthropic model.

provider: anthropic
model: claude-sonnet-4-5

Translate offline with the demo provider

Produce keyless, clearly-marked illustrative output for smoke tests.

provider: demo

Translate only new content

Skip blocks that already have a translation.

provider: openai
skipMatched: true

Processing notes

  • Operates on translatable blocks with non-empty source; other parts pass through unchanged.

  • Blocks with inline codes are translated through a placeholder-preserving prompt and reconstructed from the response.

  • Each translation is recorded as an alternate-translation annotation tagged with the provider.

Limitations

  • Requires a target language and, for hosted providers, valid credentials.

  • Hosted providers make network API calls; cost and latency scale with content volume.

  • Session-cache reuse applies on the block-by-block path; the batched path writes overlays on output but does not pre-skip via the per-block cache.

← Back to the Tool Reference