Gå til hovedinnhold

AI Translate tool

The AI Translate tool translates untranslated block content with a large language model. It supports several providers (Anthropic, OpenAI, Gemini, Azure OpenAI, Ollama) and writes the result as the target text, recording an alternate-translation annotation with the originating provider. A target language is required, and provider credentials are required for hosted providers.

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.

IDai-translate
SourceBuilt-in
Categorytranslation
Cardinalitybilingual
Requirestarget-language, credentials
Tagsai-powered

Parameters

ParameterTypeDefaultDescription
apiKeystringAPI key for the AI provider
batchConcurrencyinteger1Number of concurrent batch calls (0 or 1 = sequential)
batchSizeinteger100Number of blocks per LLM call
modelstringAI model name
providerstringanthropicAI provider
skipMatchedbooleanfalseSkip blocks that already have a target translation

Configure these parameters interactively and copy the flow-step YAML on the Tool Reference.

Examples

Translate with Anthropic

Translate untranslated blocks using an Anthropic model.

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

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