Translation Memory

Keep your approved translations in a memory, add terminology and a style guide, and translate new text with all of it.

A translation memory stores approved translations, one source text at a time. When you translate with it, stored translations are reused as they are and only new text is machine translated, following the term bases, glossaries and style guide you attach. New translations are saved back to the memory for review.

Create a memory

Call Create a translation memory with a name, a sourceLanguage, at least one entry in targetLanguages and a context that says what the memory is for (who the client is, the product, the audience). Keep the id it returns. Already have translations? Load them with Import a file or Import terms.

Add terminology and style

Create a term base with Create a term base and its concepts with Create a concept, or a glossary with Create a glossary and Add a glossary entry. Upload your style documents with Create a style guide. Then attach them to the memory with Set attached term bases, Set attached glossaries and Set the style guide of a memory.

Translate

Call Translate texts with the memory's tmId, your sourceTexts and the targetLanguages. The translations come back in the response, one group per language, with matchType saying whether each one was reused (exact) or machine translated (mt).

Review

Machine translations are saved as unverified. Read them with List terms, correct them with Update a term, and mark them verified or approved with Set a term status or Set term statuses in bulk.

Key concepts

ConceptWhat it is
Translation memoryPairs of source text and translations, per target language, each with a review status.
Term baseConcepts, each with its terms in several languages, with grammar and usage details. Attach one to many memories.
GlossaryA flat list of terms with their translations, including do-not-translate entries. Where a glossary and a term base both match, the glossary wins.
Style guideRules for how to translate, for one or more languages or for all of them. A memory follows one style guide.
ProviderWhere a memory is stored: vitratm (the default) or phrase.

Providers

New memories are stored on VitraTM unless you send provider: "phrase". Phrase needs a Phrase API token saved in your organization's settings; List providers shows whether it is available. To use a memory that already exists on a provider, find it with List provider memories and send its id as tmRef with tmMode: "existing".

Most features are VitraTM features: review status, several source languages in one memory, Smart Match, the choice of engine, per-text meta, term bases, glossaries, organization style guides and file import and export. A Phrase memory uses the term bases and style guides of its Phrase project, which you manage in Phrase.

Languages

Languages are BCP-47 codes such as en-US, hi-IN or fr-FR. You don't need to add target languages up front: translating into a new language, or writing a term in one, adds it to the memory. Target languages can be added but not removed.

Translating

Requests of up to 50 texts answer quickly. Larger VitraTM requests run as a background job while the request waits, which can take several minutes, so set a long client timeout or send smaller batches. Each translation says where it came from:

matchTypeMeaning
exactA stored translation, reused as it is. Use leverageMinStatus: "verified" to reuse only reviewed ones.
fuzzy, semanticA close stored match.
mtMachine translated now, and saved to the memory as unverified.

To give the model context for a single text, such as its i18n key or the screen it is on, send sourceTexts as objects: { "text_to_translate": "Save", "meta": { "key": "settings.save" } }. VitraTM returns meta with each result.

With Phrase, the default method pretranslate_job runs in the background: you get status: "processing" and an operationId. Poll Get a translation operation every 5 to 30 seconds until status is ready or failed. The language_ai method answers in the request.

Review status

statusMeaning
unverifiedMachine output, or an edit that has not been reviewed.
verifiedProofread.
approvedApproved for use.

Editing a translation with Update a term sets it back to unverified unless you send a status. Phrase memories have no review status.

Imports and exports

Import a file accepts TMX, XLIFF, XLSX, CSV and TSV up to 25 MB; Download an import template gives you a starter file with the memory's languages. Imports run in the background: poll Get an import until status is ready or failed. Export a translation memory downloads the memory in the same formats. Term bases (XLSX, CSV, TBX) and glossaries (XLSX, CSV) have their own import and export endpoints.

Instead of sending a file in a multipart form, you can put it in storage first: Get an upload URL for a file import, PUT the file to the URL, then send the uploadKey you got, with the other fields, in a JSON body. Glossary and term base files work the same way (glossary file, term base file), and so do style guide documents (new style guide, more files), sent as uploadKeys in the order of fileLanguages.

File import and export can be turned off for an organization; the endpoints then return 403 with This feature is currently turned off.

Sharing

A parent organization can share a memory it owns with its direct child organizations: see Share a translation memory. A shared memory appears in the child's List translation memories with access: "shared", and the child can translate with it and edit its terms.

Permissions

Each endpoint page lists the permission it needs. The API key needs it on the role of the person who created the key.

ResourceCoversActions used
translation_memoryTranslation memories and their terms, term bases, glossaries, style guides, and translation.create, delete, export, import, read, share, update

Errors

Besides the usual errors, this API returns 502 or 503 with error: "TranslationServiceError" when the translation service fails, with a message you can show. Retry with backoff. Credits are not charged by any endpoint in this API.

On this page