Multilingual Ghost - automated translation of posts with Make and DeepL

Here’s how to translate your posts to any language instantly for free (well, 500.000 characters / month) with DeepL Translate and Make. Links, images and Ghost Cards are preserved in the translation.

Steps to enable translation

  1. Register a free API account on DeepL Translate
  2. Create a custom Integration in Ghost
  3. Create an internal tag in Ghost, #translated / hash-translated
  4. Create a Scenario in Make with Ghost and DeepL

This is what we’ll have in Make when ready…

First, register a free API-account with DeepL Translate and save the API-key.

Then, set up a Custom integration for Make.com in Ghost

You need three things for Make integration…

  • Admin API key
  • API url
  • Integration ID

Create the internal tag #translated

The Make scenario triggers on Post Published in Ghost. Since the scenario will/can publish a post, we have to cut the loop, else Make will continue to translate already translated posts… until we run out of Make credits.

And, if we leave the translated post as Draft, we don’t want it to translated again when we Publish.

In the next step we will set up a filter with this #translated tag so Make will not execute the translation if the tag is found.

Create the Scenario in Make

OK, here we go, a Blueprint json for this scenario in Make is available on this link, right-click to save.

  1. Add a Ghost Publish Post module, using the data from Ghost Custom integration
  2. Add a DeepL translate module, using the API key - translate the HTML field from Ghost module, and assign source and target language.
  3. Add a second DeepL translate module, translate the Title field from Ghost module, and assign source and target language.
  4. Add a Ghost Create Post module using the output from the two DeepL modules (HTML and Title). Add a hash-translated tag to the new post, and don’t forget the Feature Image. Suggestion: create new posts as Draft until you see everything working.
  5. Add a Filter after the first Ghost module to stop execution if the hash-translated tag is found. Here’s the filter set-up. Only posts which do not contain hash-translated are processed.

make-ghost-translate3-filter

Done

Activate the scenario in Make and publish a post in Ghost. Your post, translated, shows up a few seconds later in Ghost.

3 Likes

Update: The filter will work much better with an array operator, “Does not contain”.

The previous filter works if hash-translated is the first primary tag, this filter checks all tags…

image

Thank you so much for sharing this! Just to clarify, this process produces a translated post within the same Ghost site? In other words, the English and (for example) French content would be in the same site. Or can the post be published in a second French site?

You’re welcome @Andy_DeRoin_They-The

If you translate to same site you can use routing on tags “fr” or “en”. Assign language tags to posts and make Collections in Ghost based on the tag.

https://ghost.org/docs/themes/routing/

More SEO friendly is separate sites, you can localize menu & UX, get all metadata translated for en.example.com and fr.example.com etc…

1 Like