Skip to main content

Speed up translation in drupal

This was a nice one ... We had the requirement to translate a website to a language we do not speak, but more for SEO reasons than any other so it was OK to do it with AI.

I've installed drupal Translation Management Tool, added the deepl tmgmt module and used a deepl API-Free account to translate the nodes which should be translated ... So far, so good - this worked very fast and had only minor challenges.

But then, I use some custom modules for funcitonality with lots of translatable text snippets. So i installed POTX drupal module to create a custom *.pot file for further translations. I then found a php commandline tool which send *.pot files to the deepl API so to translate them as well: Potrans (see links).

I was able to import the translated *.po file after deleting all comments in the file.

This way, the translation was made in 4 hours - with human translators I needed 3 days for the same site, in a more important language where we would not consider AI.