Translation memory

Updated

Translatize remembers the translations your team approved or wrote by hand and offers them again wherever the same or a similar source text comes back. Exact matches fill missing values before AI translation runs, and those values are not billed. The memory doesn't learn from AI translation, imports or merges, so what it offers is something a person approved or wrote.

How the memory fills itself

There is nothing to import or maintain. Every project has its own memory, and it grows as your team works:

What happensSaved to memory?
A label is approved – on any branchYes: every translation the label has, one entry per language.
Someone changes a translation on main – in the label editor, or through the API, CLI or MCP serverYes: the new text, for each language that changed.
Someone changes a translation on any other branchNo – only once the label is approved.
AI translation fills a valueNo
A file is imported in the appNo
A branch is merged, or Git sync pulls values inNo
A value is filled from the memory itselfNo
A label is marked "do not translate"No – its source text is copied, not translated, so there is nothing to learn.

The memory keeps one entry per source text and language pair. A later approval replaces it. A later edit replaces an earlier edit, but never a translation that was approved, so someone tidying a value on main can't quietly overwrite what a reviewer signed off.

An edit only counts when the value really changed. A push that re-sends the same values – for example translatize push after a pull – adds nothing.

Writes made with an API token count as a person's edit
A token was created by someone on your team, so a value written or approved with it on main is treated like that person's own decision. If an agent or script writes machine translations through the API, let it work on a branch (a create-own token does this) and leave approval to a person. On a branch, nothing reaches the memory until the label is approved.

Exact and similar matches

A match is exact when the source text is the same and has the same placeholders. Delete {name}? and Delete {file}? are not exact: the words agree, the placeholder doesn't. Everything else that comes close is a similar match, shown with a match percentage (100 % means exact).

When a similar match uses different placeholder names, Translatize renames them in the suggested translation to match your text. The suggestion for Delete {name}? reads {name} löschen?, not {file} löschen?, and is marked as renamed.

Exact matches fill before AI translation

When you run AI translation, Translatize first looks up every missing value in this project's own memory. Values with an exact match are filled from memory and never sent to the AI. They are not counted against your AI characters. Everything else is translated by the AI as usual.

The result tells you how much came from memory. The completion notification adds a clause such as “60 filled from translation memory”, and the email lists “Filled from translation memory” with the count. With an API token, GET …/translation/status reports the same number as lastJob.counts.fromMemory.

Turning it off

The switch is Project Settings → AI translation → Translation memory → Fill exact matches from memory. It is on by default. With it off, every missing value goes to the AI and is billed. Admins and owners can change it; developers see the setting read-only.

Similar matches don't fill anything. With the Translation memory context source on, they are given to the AI as references, so its wording follows yours. See AI translation for the context sources.

The estimate in the Auto-Translate dialog

Open Auto-Translate on the labels page and tick the target languages. Below them, a line estimates what the memory will cover on the current branch, for example “312 values can be filled from memory (about 45,000 characters saved).”

A second line says how many more values have a similar translation in memory to guide the AI. If the fill switch is off, the dialog tells you how many values have an exact match that won't be used. The count is an estimate made before the run; the completion notification has the final number.

Suggestions in the label editor

Open a label and click into, or type in, a target-language field. When the memory has a match for the source text, up to three suggestions appear under the field, each with:

  • the match percentage, and “Same text” or “Similar text”;
  • where it came from: “From an approved label”, “From a person's edit” or “Added by hand”;
  • for similar matches, the memory's source text with the words that differ struck through or highlighted;
  • “Placeholders renamed to match this text” when that happened.

Apply puts the suggestion into the field. Nothing is saved until you save the label, so you can still adjust it. Translators get suggestions like everyone else.

Sharing across a workspace

Projects in the same workspace can use each other's memory. The switch is Project Settings → AI translation → Translation memory → Share memory across the workspace, on by default. Two projects share when both have it on; switching it off keeps a project's entries to itself in both directions.

Shared entries show up as editor suggestions, as API matches and as references for the AI. They are never filled automatically: only a project's own memory fills values before AI translation. A project that has never translated “Save changes” itself still sees how a sibling project did, and a person decides whether to use it.

Browse, correct and delete entries

Project Settings → Translation memory lists the project's own entries, newest first. Search the source text or the translation, and filter by the From and To language. Each entry shows its language pair, where it came from, how often it has been used and the label key it was saved from.

Developers, admins and owners see this tab and can Edit a translation, which marks the entry “Added by hand”, or Delete it. A deleted entry is no longer suggested or used to fill values, and deleting can't be undone.

Deleting a label doesn't delete what the memory learned from it. If a translation should never come back, delete its entry here.

For agents and scripts: the API

Agents that translate on their own can ask the memory first and reuse the wording your team already chose. The endpoint is part of the Integration API and works with every token role. It is not tied to a branch, because the memory belongs to the whole project.

POST /integrations/projects/{projectId}/tm/matches
curl -X POST "https://api.translatize.com/v1/integrations/projects/$PROJECT_ID/tm/matches" \
  -H "Authorization: Bearer $TRANSLATIZE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "texts": ["Save changes", "Delete {name}?"],
    "sourceLang": "en",
    "targetLang": "de",
    "threshold": 80
  }'

$PROJECT_ID is the id in your app URL (/app/projects/<id>/labels), or project.id from GET /integrations/me.

FieldRequiredMeaning
textsyesSource texts to look up: 1 to 100 per request, each up to 10,000 characters and 100,000 in total.
sourceLangyesThe language of the texts.
targetLangyesThe language you want translations in.
thresholdnoThe lowest match percentage to return, 50 to 100. Default 75. Use 100 for exact matches only.
Response
{
  "results": [
    {
      "text": "Save changes",
      "matches": [
        {
          "sourceText": "Save changes",
          "targetText": "Änderungen speichern",
          "match": 100,
          "quality": 1,
          "placeholderMapped": false,
          "origin": "approved"
        }
      ]
    },
    {
      "text": "Delete {name}?",
      "matches": [
        {
          "sourceText": "Delete {file}?",
          "targetText": "{name} löschen?",
          "match": 98,
          "quality": 1,
          "placeholderMapped": true,
          "origin": "approved"
        }
      ]
    }
  ]
}

Every text comes back in the order you sent it, with up to three matches, best first. A text without a match has an empty matches array. targetText already carries your placeholder names (placeholderMapped says when they were renamed), origin is approved, human_edit or manual, and quality ranks approved translations above edits. With workspace sharing on, matches include the other sharing projects' entries.

Errors

CodeHTTPWhen
invalid_request400The body failed validation – no texts, too many or too long texts, a threshold outside 50–100, or a malformed language code. detail says which.
access_denied401No token, an unknown or revoked token, or an app login instead of an mcni_ token.
token_expired401The token has expired.
project_mismatch403The projectId in the path isn't the token's project.
token_inactive403The token's branch was deleted. Re-point the token at an existing branch.
ip_not_allowed403The request came from outside the token's IP allowlist.
access_denied403The person who created the token has left the project or now has a lower role than the token.
project_not_found404The token's project has been deleted.
rate_limit_exceeded429More than 2,000 requests from one IP in 15 minutes.

From the SDK and the MCP server

@translatize/core wraps the endpoint as findTranslationMemory:

lookup.ts
import { TranslatizeClient } from "@translatize/core";

const client = new TranslatizeClient({
  apiUrl: "https://api.translatize.com/v1",
  token: process.env.TRANSLATIZE_API_TOKEN!,
});

// The project comes from the token; lists longer than 100 texts are split for you.
const { results } = await client.findTranslationMemory({
  texts: ["Save changes", "Delete {name}?"],
  sourceLang: "en",
  targetLang: "de",
  threshold: 80,
});

for (const { text, matches } of results) {
  console.log(text, "→", matches[0]?.targetText ?? "(no match)");
}

The MCP server exposes it as the find_translation_memory tool (texts, target_lang, optional source_lang and threshold; the source language defaults to the project's). An agent that writes translations itself should call it before translating.

Plans

Translation memory is included on every plan, Free too: learning from approvals and edits, editor suggestions, workspace sharing, the Translation memory tab and the API. Filling exact matches happens inside an AI translation run, so that part matters on the plans with AI translation, Professional and Agency, where each filled value is one the AI allowance doesn't pay for.

When a project is deleted

A project's memory belongs to that project. Deleting the project deletes its entries, and from then on they are not suggested to other projects in the workspace either.