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
enginestringllmOversettelsesmotor: en KI-modell eller en maskinoversettelseleverandør
apiKeystringAPI-nøkkel for KI-leverandøren
batchConcurrencyinteger1Antall samtidige batchkall (0 eller 1 = sekvensielt)
batchingstringautoHvor mange blokker som deler ett LLM-kall
contextstringkeyHva modellen får vite om en blokk utover blokken selv
contextWindowinteger2Blokker på hver side som sendes som referanse (med kontekst: naboer)
instructionstringEkstra veiledning for modellen under oversettelse (f.eks. «uformelt register; behold produktnavn på engelsk»)
modelstringAI-modellnavn
providerstringanthropicAI-leverandør
reusestringpriorOffer a block's previously approved translation to the model as reference
skipMatchedbooleanfalseHopp over blokker som allerede har en måloversettelse

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