๐Ÿงฉ Connect your CMS to Redokun with the API

If your company manages its content in a CMS built or adapted for you, your team can translate that content with Redokun without copying, pasting or sending files. This article explains how it works in plain words, what you need, and what to give your developers to get it built.

๐Ÿงช The Redokun API is in beta. Some things may not work as expected or may change. Tell us what works and what doesn't in the feedback form.

๐Ÿ‘‹ Who this article is for

You are a product manager, a marketer or a content manager. You are not a developer, and you don't need to be one to read this page.

This article is for you if:

  • your content lives in a CMS, a product database or another system made for your company;
  • you translate that content often, into one or more languages;
  • someone in your company, or a partner agency, can make changes to that system.

The first part is for you. The last part, For your developer, is written for the person who will build the connection: you can send them the link to this page.

๐Ÿ’ก Do you keep your files in Google Drive or SharePoint, or do you send your emails with HubSpot? You don't need a developer: we have ready-made examples for Google Drive, SharePoint and HubSpot.

๐Ÿ˜ฎโ€๐Ÿ’จ The problem with translating by hand

Without a connection, every translation follows the same steps. Someone copies or exports the text from the CMS, sends it to the translators, waits, pastes the translation back, and checks that nothing was missed. Then the same again for the next language, and again when the original text changes.

It works, but it is slow, and each manual step is a place where a paragraph gets lost or an old version comes back.

๐Ÿ” How the connection works

Redokun has an API: a way for another system to use Redokun without a person clicking in the web app. Your CMS can use it to do three things on its own.

  1. The CMS sends the content to Redokun. It packs the text into a file and uploads it, with the languages you want.
  2. Redokun translates it. First with your Translation Memory, so what you already translated comes back the same. Then with AI for the rest. If you want, your translators review the text in Redokun, as they do today.
  3. The CMS collects the translation. It downloads the translated file and saves the text as the language version of that content.

For the people who write and publish, the result is one button in the CMS, for example Translate, or no button at all if the translation starts when the content is published.

๐ŸŽ›๏ธ Two ways to run it

You can choose how much human review you want. It can be different for each type of content.

Automatic With review
Who translates Translation Memory and AI Translation Memory and AI, then your translators
When the translation is ready In a few minutes When your translators confirm it
Good for Content that changes often, internal content, first drafts Content your customers read, legal or technical text

In both cases the translations are saved in your Translation Memory, so the next piece of content costs less time and fewer words.

โœ… What you need

  • A Redokun plan with the API. Premium or Basic.
  • A developer who can change your CMS. The connection is a piece of software inside or next to your CMS. Redokun doesn't build it for you.
  • A CMS that can keep content in more than one language. If your CMS has no place for the Italian or German version of a text, for instance, that has to be added first.

โฑ๏ธ How much work is it?

We can't give you a number of days, because it depends on your CMS. What we can tell you is where the work is.

  • The Redokun side is small. The whole exchange is six steps, the same for every customer, and they are documented.
  • The CMS side is the larger part. Your developer has to take the text out of the CMS in a clean file, and put the translation back in the right place.

A good way to start is with one type of content and one language. When that works, adding more is mostly repetition.

๐Ÿ“ Decide this before development starts

Your developer will ask you these questions. If you answer them first, the work is faster.

  • Which content? Start with one type, for example product descriptions or help articles.
  • Which languages? The source language and the target languages.
  • Automatic or with review? And who the translators are, if any.
  • What starts a translation? A button, publishing the content, or a schedule.
  • What happens when the original changes? See the next section.
  • Who needs to know when a translation is ready?

๐Ÿ”„ Keeping translations up to date

This is the question that matters most over time, so it is worth a clear answer.

When the original text changes, the CMS sends it to Redokun again. The parts you didn't change come back from your Translation Memory, the same as before. Only the new or changed parts are translated again.

One rule makes this work: fix translations in Redokun, not in the CMS. A correction made in Redokun is saved in your Translation Memory and comes back every time. A correction typed in the CMS is lost the next time the content is translated.

๐Ÿ‘ฉโ€๐Ÿ’ป For your developer

This section is for the person who builds the connection.

The six calls

The API is REST over HTTPS, with JSON answers and a Bearer token. A full exchange for one piece of content looks like this:

Step Call Notes
1. Upload POST /v1/documents Multipart form with the file, the source language and the target languages. You can also assign translators here
2. Wait for indexing GET /v1/documents/{id} Repeat until the status is INDEXED
3. Pre-translate POST /v1/documents/{id}/translations Choose Translation Memory, AI, or both, for each language
4. Check progress GET /v1/documents/{id}/translations Repeat until no language is PRE_TRANSLATING
5. Confirm and generate POST /v1/documents/{id}/translations/{language}/generate Creates the translated file. For a flow with review, skip the confirmation and wait until your translators confirm
6. Download GET /v1/documents/{id}/translations/{language}/download Returns a link to the file. The link is valid for 15 minutes

Which file to send

Redokun translates files, so the CMS content has to be exported as one. The API accepts .html, .json, .xml, .xliff, .xlf and .txt, and also Word, Excel, PowerPoint, InDesign, PDF and .srt files.

For rich text, HTML is a practical choice. In our tests, formatting, links and placeholders such as {{first_name}}   came back unchanged. A simple pattern is to wrap each field of the content in an element with your own identifier, and read the translated file back by that identifier.

Things to know before you design it

  • There are no webhooks yet. To know when something is ready, call the status endpoints at intervals.
  • Two pre-translations at a time. If a third one starts while two are running, the API answers 409: wait and try again.
  • Words are used when the file is generated, not at upload. If the plan doesn't have enough words left for a document, the API answers 402.
  • Keep the API key on the server. Create it with the scope Read and write, and never put it in code that runs in the browser.
  • Each upload creates a document in Redokun. Give the file a name that lets you find the content it came from, for example with the ID of the content in your CMS.

Where to find the details

๐Ÿ’ฌ Feedback and support

Tell us which system you want to connect in the feedback form. It helps us decide which examples to publish next.

If you or your developer are stuck, write to support@redokun.com and we will help you.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us