Translation options
Options apply differently to the LLM and translator paths; see TranslationService.
formality: 'formal', 'informal', 'default'domain: 'technical', 'legal', 'medical', 'marketing', 'general'glossary: array of term translationssite: site identifier (with). When noSite () glossaryis set, the glossary that site keeps for the language pair applies — in the prompt on the LLM paths, as a DeepL glossary on the DeepL path (ADR-208, Managing translation glossaries)preserve_: boolformatting provider,model: pin the provider / model for this callconfiguration: identifier of a storedLlmwhose translator is used on the specialized-translator path (Configuration translate)With Translator () tag_:handling htmlorxml(with). DeepL keeps the tags and translates the text between them; the LLM translator keeps tags whileTag Handling () preserve_is on (ADR-209)formatting cache_: seconds (ttl with). Opt-in cache forCache Ttl () translate: an identical request — translator, languages, text, glossary, options, and for the LLM translator the default configuration with its skills (no provider pinned) or the provider's default model (provider pinned, no model) — is answered from theWith Translator () nrllm_cache (tagresponses Translation) without reaching the translator, and therefore without a budget check or a usage row. Blank and truncated answers are never stored; saving or deleting a glossary, configuration, model, provider, skill or prompt snippet flushes the tag. Off by default (ADR-209)Service:: CACHE_ TAG max_: on the configuration path capped at the model'stokens max_when known (ADR-209)output_ tokens polish(`withPolish (bool $enabled = true, ?string $instruction = null) ): after a translator other than the LLM one, e.ADR-233 <adr-233>`)g. Deep L, ``translate With Translator ()`` and ``translate Batch With Translator ()`` let a language model revise the text for fluency, terminology and tone, on the default configuration or the pinned provider and model. Tags, placeholders and glossary terms must survive; when they do not, or the call fails or the budget refuses it, the first translation is returned. A guardrail stop is thrown instead. ``is Polished ()`` on the result says whether the revision applied, ``metadata ['polish'] ['reason']`` why not. The revision is recorded as a ``translation_ polish`` row with the characters of the first translation sent for revision, written whether or not the answer is accepted. The revision is an ordinary request. An uncached translation with a revision normally uses two requests. User limits cover both calls; each configuration's limits apply only to calls made through that configuration. Exhausting the translator's configuration limit does not itself block a revision using another configuration. A budget refusal of the revision returns the first translation. A configuration named with ``with Configuration ()`` selects the translator only; it does not apply to the revision. The instruction goes into the system message: it must come from the calling code, never from editor input. Off by default (: ref: