Skip to content
LATW AI Translation for TranslatePress

How the Translation Prompt Works

On this page

Editing the prompt is available in LATW AI Translation for TranslatePress PRO.

The prompt is the instruction sent to a language model with every translation: what it is
translating, into what, and how it should behave. The free plugin ships one prompt and prints it in
full under AI Translation → Settings → Translation → Translation Prompt — so you always know
exactly what is being sent, even where there is nothing to change.

With PRO that text becomes an editable field, with a Reset to Default button next to it. Your
wording is stored by PRO, so it is still there if a licence lapses and comes back; while the
licence is inactive, translations use the prompt the free plugin ships.

While the site is connected to LATW Cloud, the prompt, the glossary and the website description are
set for the site in LATW Cloud instead: the Translation Prompt row shows a link there, and the
Glossary screen says its entries are not used. Your own prompt and glossary are kept and apply
again after you disconnect.

#What the AI actually receives

TranslatePress keeps your site as a list of strings, so that is what the AI receives: the strings a
job has to translate, as one JSON object keyed by TranslatePress’s own id for each string:

{
  "412": "Aeropress filters compared",
  "413": "Paper, metal or cloth?",
  "414": "The paper filter keeps roughly half the sediment out of the glass."
}

JSON rather than plain text, for three reasons: each answer goes back to exactly the string it
belongs to, HTML and placeholders survive untouched inside the values, and a broken answer is
detectable instead of being silently saved.

Around that JSON the plugin assembles the prompt. Every translation is sent in this shape:

1. Translation prompt        the template from Settings, with its placeholders filled in
2. Website context           your Website Description, via {{website_context}}
3. Glossary                  the pairs for this language pair, via {{glossary}}
4. Payload note              added by the plugin — what this payload is
5. REFERENCE                 added by the plugin — the page's existing translations (one mode only)
6. INPUT JSON                the strings to translate

Parts 1–3 are yours to edit. Parts 4–6 are assembled per job and cannot be edited, because they
describe the job rather than your preferences.

When this plugin is TranslatePress’s own automatic translation engine, pages are translated the same
way, in smaller chunks, while the visitor waits.

#Part 1 — the template and its placeholders

The template ships with a default that tells the model to behave as a translation engine (no
questions, no commentary, no splitting the answer into parts) and to return JSON with the same keys
as the input.

Four placeholders are filled in when the prompt is built:

Placeholder Filled with
{{source_language}} The language name of the original, e.g. “Polish”
{{destination_language}} The language name being translated into, e.g. “German”
{{website_context}} Your Website Description from Settings → General, prefixed with “Website context:”, if you wrote one
{{glossary}} Your glossary entries for this language pair (PRO)

A placeholder that is not in the template is not sent. This matters most for the glossary: if
you edit the prompt and remove {{glossary}}, translations continue perfectly happily with no
glossary at all, and nothing in the result would say so. The settings screen therefore warns about
every missing placeholder — as you type, and again after saving — and says what each one costs you:
without {{destination_language}}, for instance, the model is not told which language to translate
into at all.

{{glossary}} resolves to nothing without the PRO add-on, so a prompt that mentions it still works
in the free version — the line simply disappears.

Keep the placeholders. A prompt with {{destination_language}} removed leaves the model guessing
which language you wanted. Reset to Default restores the shipped template.

#Part 4 — the payload note

The JSON above is ambiguous in a way that matters: three values could be three fragments of one
article, or three unrelated labels. TranslatePress stores a page as independent strings, and the same
string can appear on many pages, so the plugin tells the model to treat them that way:

The values are unrelated interface strings from a website: button labels, menu items, notices. Each
one is independent of the others. Keep every translation close to the original in length, because
these appear in a fixed layout, and keep placeholder tokens such as %s, %d, {name} exactly as they
are.

It is a fact about the job, not a preference, so it is added to your custom prompt as well as to the
default one. Where consistency across a page matters, the REFERENCE block below is what provides it.

#Part 5 — the REFERENCE block

PRO. This appears only when Outdated Translations is set to translate the new text with the
page’s existing translations as reference
(Updating Outdated Translations). The job translates the
new strings alone, and up to 60 of the page’s already translated strings travel with it:

[
  {
    "field": "ctx_398",
    "source": "Aeropress filters compared",
    "published_translation": "Aeropress-Filter im Vergleich"
  }
]

Corrections you made in TranslatePress’s editor come first, and wherever you corrected the same
sentence anywhere on your site, your wording is what the model sees. The note above the block tells
the model that this material is approved, so it must reuse its terminology and tone rather than
improve on it, and must not translate or return any of it. Only the strings in INPUT JSON are asked
for, and anything from REFERENCE that comes back anyway is never written.

#What comes back

The model returns a JSON object with the same keys. The plugin then:

  1. Parses it, tolerating a model that wraps the JSON in a markdown fence.
  2. Passes the result to the latwaitt_translated_strings filter, where your site can correct or
    reject it — see Checking Translations Before They Are Saved.
  3. Writes each translated value into TranslatePress for the string it belongs to — but only if that
    string still has no translation. A string someone translated or corrected while the job was out
    keeps what it has.

A reply that is not valid JSON fails the job instead of saving half a page. A string the model left
out of its answer simply stays untranslated.

#The other settings that shape the request

  • Website Description (Settings → General) — if all you want is for the model to understand what
    kind of site it is translating, you do not need an editable prompt at all. It is sent with every
    translation in the free version too, and for most sites it is the difference that matters.
  • Reasoning Effort (Settings → General) is sent alongside the prompt on models that support it.
    Higher effort means slower and more expensive, with more attention paid to instructions like the
    glossary.
  • Processing (Settings → General) changes how the request is delivered, never what it contains.
  • Google Translate, DeepL and MyMemory ignore this page entirely. They are machine-translation
    engines: they translate text and cannot follow instructions, so the prompt, the website
    description, the payload note and the REFERENCE block do not apply. The glossary still reaches
    DeepL, through its own glossary feature — see Translation Engine – AI Providers.

#Seeing what was actually sent

AI Translation → History has a Request column. For OpenAI in background or batch processing,
and for Claude in batch processing, View shows the exact prompt that was sent, with the
placeholders filled in and the payload note and REFERENCE block included. For synchronous jobs it
shows the strings that were sent.

This is the fastest way to settle questions like “was my glossary in there?” — it either appears in
the stored prompt or it does not.

#Editing the prompt safely

Worth adding:

  • Tone and register — formal or informal address, which matters a great deal in German, Polish or
    French.
  • Vocabulary specific to your industry — “this is a medical site, prefer clinical terms over
    colloquial ones”.
  • Things that should stay in the original language — product names, legal terms, code samples.

Worth keeping:

  • The JSON output rules. They are what makes the answer mappable back to each string; a prompt that
    invites prose instead of JSON fails every job. Rewriting that section will not make translations
    better.
  • The four placeholders, even if you rewrite everything around them.
  • The instruction not to split the answer into parts.

Not worth relying on:

  • The prompt alone for terminology a model keeps getting wrong. Instructions raise the odds; they
    do not enforce anything. Enforcement belongs in the filter described in Checking Translations
    Before They Are Saved
    .

#What happens if the licence lapses

The site goes back to translating with the prompt the free plugin ships. Your own wording is not
deleted — it is stored and comes back if the licence does — but it is not used while the prompt is
locked. This is deliberate: a prompt nobody can see or edit should not keep steering translations.