{"id":242,"date":"2026-11-18T14:15:40","date_gmt":"2026-11-18T14:15:40","guid":{"rendered":"https:\/\/docs.latw.ai\/uncategorized\/translation-prompt-3\/"},"modified":"2026-11-18T14:15:40","modified_gmt":"2026-11-18T14:15:40","slug":"translation-prompt-3","status":"publish","type":"post","link":"https:\/\/docs.latw.ai\/pl\/latw-for-translatepress\/translation-prompt-3\/","title":{"rendered":"How the Translation Prompt Works"},"content":{"rendered":"<p><em>Editing the prompt is available in LATW AI Translation for TranslatePress <strong>PRO<\/strong>.<\/em><\/p>\n<p>The prompt is the instruction sent to a language model with every translation: what it is<br \/>\ntranslating, into what, and how it should behave. The free plugin ships one prompt and prints it in<br \/>\nfull under <strong>AI Translation \u2192 Settings \u2192 Translation \u2192 Translation Prompt<\/strong> \u2014 so you always know<br \/>\nexactly what is being sent, even where there is nothing to change.<\/p>\n<p>With PRO that text becomes an editable field, with a <strong>Reset to Default<\/strong> button next to it. Your<br \/>\nwording is stored by PRO, so it is still there if a licence lapses and comes back; while the<br \/>\nlicence is inactive, translations use the prompt the free plugin ships.<\/p>\n<p>While the site is connected to LATW Cloud, the prompt, the glossary and the website description are<br \/>\nset for the site in LATW Cloud instead: the <strong>Translation Prompt<\/strong> row shows a link there, and the<br \/>\n<strong>Glossary<\/strong> screen says its entries are not used. Your own prompt and glossary are kept and apply<br \/>\nagain after you disconnect.<\/p>\n<h2>What the AI actually receives<\/h2>\n<p>TranslatePress keeps your site as a list of strings, so that is what the AI receives: the strings a<br \/>\njob has to translate, as one JSON object keyed by TranslatePress&#8217;s own id for each string:<\/p>\n<pre><code class=\"language-json\">{\n  \"412\": \"Aeropress filters compared\",\n  \"413\": \"Paper, metal or cloth?\",\n  \"414\": \"The paper filter keeps roughly half the sediment out of the glass.\"\n}<\/code><\/pre>\n<p>JSON rather than plain text, for three reasons: each answer goes back to exactly the string it<br \/>\nbelongs to, HTML and placeholders survive untouched inside the values, and a broken answer is<br \/>\ndetectable instead of being silently saved.<\/p>\n<p>Around that JSON the plugin assembles the prompt. Every translation is sent in this shape:<\/p>\n<pre><code>1. Translation prompt        the template from Settings, with its placeholders filled in\n2. Website context           your Website Description, via {{website_context}}\n3. Glossary                  the pairs for this language pair, via {{glossary}}\n4. Payload note              added by the plugin \u2014 what this payload is\n5. REFERENCE                 added by the plugin \u2014 the page's existing translations (one mode only)\n6. INPUT JSON                the strings to translate<\/code><\/pre>\n<p>Parts 1\u20133 are yours to edit. Parts 4\u20136 are assembled per job and cannot be edited, because they<br \/>\ndescribe the job rather than your preferences.<\/p>\n<p>When this plugin is TranslatePress&#8217;s own automatic translation engine, pages are translated the same<br \/>\nway, in smaller chunks, while the visitor waits.<\/p>\n<h2>Part 1 \u2014 the template and its placeholders<\/h2>\n<p>The template ships with a default that tells the model to behave as a translation engine (no<br \/>\nquestions, no commentary, no splitting the answer into parts) and to return JSON with the same keys<br \/>\nas the input.<\/p>\n<p>Four placeholders are filled in when the prompt is built:<\/p>\n<table>\n<thead>\n<tr>\n<th>Placeholder<\/th>\n<th>Filled with<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>{{source_language}}<\/code><\/td>\n<td>The language name of the original, e.g. &#8220;Polish&#8221;<\/td>\n<\/tr>\n<tr>\n<td><code>{{destination_language}}<\/code><\/td>\n<td>The language name being translated into, e.g. &#8220;German&#8221;<\/td>\n<\/tr>\n<tr>\n<td><code>{{website_context}}<\/code><\/td>\n<td>Your <strong>Website Description<\/strong> from Settings \u2192 General, prefixed with &#8220;Website context:&#8221;, if you wrote one<\/td>\n<\/tr>\n<tr>\n<td><code>{{glossary}}<\/code><\/td>\n<td>Your glossary entries for this language pair <em>(PRO)<\/em><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>A placeholder that is not in the template is not sent.<\/strong> This matters most for the glossary: if<br \/>\nyou edit the prompt and remove <code>{{glossary}}<\/code>, translations continue perfectly happily with no<br \/>\nglossary at all, and nothing in the result would say so. The settings screen therefore warns about<br \/>\nevery missing placeholder \u2014 as you type, and again after saving \u2014 and says what each one costs you:<br \/>\nwithout <code>{{destination_language}}<\/code>, for instance, the model is not told which language to translate<br \/>\ninto at all.<\/p>\n<p><code>{{glossary}}<\/code> resolves to nothing without the PRO add-on, so a prompt that mentions it still works<br \/>\nin the free version \u2014 the line simply disappears.<\/p>\n<p>Keep the placeholders. A prompt with <code>{{destination_language}}<\/code> removed leaves the model guessing<br \/>\nwhich language you wanted. <strong>Reset to Default<\/strong> restores the shipped template.<\/p>\n<h2>Part 4 \u2014 the payload note<\/h2>\n<p>The JSON above is ambiguous in a way that matters: three values could be three fragments of one<br \/>\narticle, or three unrelated labels. TranslatePress stores a page as independent strings, and the same<br \/>\nstring can appear on many pages, so the plugin tells the model to treat them that way:<\/p>\n<blockquote>\n<p>The values are unrelated interface strings from a website: button labels, menu items, notices. Each<br \/>\none is independent of the others. Keep every translation close to the original in length, because<br \/>\nthese appear in a fixed layout, and keep placeholder tokens such as %s, %d, {name} exactly as they<br \/>\nare.<\/p>\n<\/blockquote>\n<p>It is a fact about the job, not a preference, so it is added to your custom prompt as well as to the<br \/>\ndefault one. Where consistency across a page matters, the REFERENCE block below is what provides it.<\/p>\n<h2>Part 5 \u2014 the REFERENCE block<\/h2>\n<p><em>PRO.<\/em> This appears only when <strong>Outdated Translations<\/strong> is set to translate the new text <em>with the<br \/>\npage&#8217;s existing translations as reference<\/em> (<em>Updating Outdated Translations<\/em>). The job translates the<br \/>\nnew strings alone, and up to 60 of the page&#8217;s already translated strings travel with it:<\/p>\n<pre><code class=\"language-json\">[\n  {\n    \"field\": \"ctx_398\",\n    \"source\": \"Aeropress filters compared\",\n    \"published_translation\": \"Aeropress-Filter im Vergleich\"\n  }\n]<\/code><\/pre>\n<p>Corrections you made in TranslatePress&#8217;s editor come first, and wherever you corrected the same<br \/>\nsentence anywhere on your site, your wording is what the model sees. The note above the block tells<br \/>\nthe model that this material is approved, so it must reuse its terminology and tone rather than<br \/>\nimprove on it, and must not translate or return any of it. Only the strings in INPUT JSON are asked<br \/>\nfor, and anything from REFERENCE that comes back anyway is never written.<\/p>\n<h2>What comes back<\/h2>\n<p>The model returns a JSON object with the same keys. The plugin then:<\/p>\n<ol>\n<li>Parses it, tolerating a model that wraps the JSON in a markdown fence.<\/li>\n<li>Passes the result to the <code>latwaitt_translated_strings<\/code> filter, where your site can correct or<br \/>\nreject it \u2014 see <em>Checking Translations Before They Are Saved<\/em>.<\/li>\n<li>Writes each translated value into TranslatePress for the string it belongs to \u2014 but only if that<br \/>\nstring still has no translation. A string someone translated or corrected while the job was out<br \/>\nkeeps what it has.<\/li>\n<\/ol>\n<p>A reply that is not valid JSON fails the job instead of saving half a page. A string the model left<br \/>\nout of its answer simply stays untranslated.<\/p>\n<h2>The other settings that shape the request<\/h2>\n<ul>\n<li><strong>Website Description<\/strong> (Settings \u2192 General) \u2014 if all you want is for the model to understand what<br \/>\nkind of site it is translating, you do not need an editable prompt at all. It is sent with every<br \/>\ntranslation in the free version too, and for most sites it is the difference that matters.<\/li>\n<li><strong>Reasoning Effort<\/strong> (Settings \u2192 General) is sent alongside the prompt on models that support it.<br \/>\nHigher effort means slower and more expensive, with more attention paid to instructions like the<br \/>\nglossary.<\/li>\n<li><strong>Processing<\/strong> (Settings \u2192 General) changes how the request is delivered, never what it contains.<\/li>\n<li><strong>Google Translate, DeepL and MyMemory ignore this page entirely.<\/strong> They are machine-translation<br \/>\nengines: they translate text and cannot follow instructions, so the prompt, the website<br \/>\ndescription, the payload note and the REFERENCE block do not apply. The glossary still reaches<br \/>\nDeepL, through its own glossary feature \u2014 see <em>Translation Engine &#8211; AI Providers<\/em>.<\/li>\n<\/ul>\n<h2>Seeing what was actually sent<\/h2>\n<p><strong>AI Translation \u2192 History<\/strong> has a <strong>Request<\/strong> column. For OpenAI in background or batch processing,<br \/>\nand for Claude in batch processing, <strong>View<\/strong> shows the exact prompt that was sent, with the<br \/>\nplaceholders filled in and the payload note and REFERENCE block included. For synchronous jobs it<br \/>\nshows the strings that were sent.<\/p>\n<p>This is the fastest way to settle questions like &#8220;was my glossary in there?&#8221; \u2014 it either appears in<br \/>\nthe stored prompt or it does not.<\/p>\n<h2>Editing the prompt safely<\/h2>\n<p>Worth adding:<\/p>\n<ul>\n<li>Tone and register \u2014 formal or informal address, which matters a great deal in German, Polish or<br \/>\nFrench.<\/li>\n<li>Vocabulary specific to your industry \u2014 &#8220;this is a medical site, prefer clinical terms over<br \/>\ncolloquial ones&#8221;.<\/li>\n<li>Things that should stay in the original language \u2014 product names, legal terms, code samples.<\/li>\n<\/ul>\n<p>Worth keeping:<\/p>\n<ul>\n<li>The JSON output rules. They are what makes the answer mappable back to each string; a prompt that<br \/>\ninvites prose instead of JSON fails every job. Rewriting that section will not make translations<br \/>\nbetter.<\/li>\n<li>The four placeholders, even if you rewrite everything around them.<\/li>\n<li>The instruction not to split the answer into parts.<\/li>\n<\/ul>\n<p>Not worth relying on:<\/p>\n<ul>\n<li>The prompt alone for terminology a model keeps getting wrong. Instructions raise the odds; they<br \/>\ndo not enforce anything. Enforcement belongs in the filter described in <em>Checking Translations<br \/>\nBefore They Are Saved<\/em>.<\/li>\n<\/ul>\n<h2>What happens if the licence lapses<\/h2>\n<p>The site goes back to translating with the prompt the free plugin ships. Your own wording is not<br \/>\ndeleted \u2014 it is stored and comes back if the licence does \u2014 but it is not used while the prompt is<br \/>\nlocked. This is deliberate: a prompt nobody can see or edit should not keep steering translations.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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\u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_latwm_translated_slug":"","footnotes":""},"categories":[19],"tags":[],"class_list":["post-242","post","type-post","status-publish","format-standard","hentry","category-latw-for-translatepress"],"_links":{"self":[{"href":"https:\/\/docs.latw.ai\/pl\/wp-json\/wp\/v2\/posts\/242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.latw.ai\/pl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.latw.ai\/pl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.latw.ai\/pl\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.latw.ai\/pl\/wp-json\/wp\/v2\/comments?post=242"}],"version-history":[{"count":0,"href":"https:\/\/docs.latw.ai\/pl\/wp-json\/wp\/v2\/posts\/242\/revisions"}],"wp:attachment":[{"href":"https:\/\/docs.latw.ai\/pl\/wp-json\/wp\/v2\/media?parent=242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.latw.ai\/pl\/wp-json\/wp\/v2\/categories?post=242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.latw.ai\/pl\/wp-json\/wp\/v2\/tags?post=242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}