bitstillery
← Back to the blog

Nine languages, one source text

The people who order from Portal, our website and web shop for the spirits trade, are spread all over the world. Plenty of them get by in English, but most would rather read their own language, especially when they’re about to place a large order. So Portal speaks nine: English, Dutch, German, French, Italian, Spanish, Chinese, Japanese and Arabic.

Translating all of that by hand never worked for us. We change text and features too often, and every change would have to go past a translator for every language. Before long, half the site would be out of date in at least one of them.

Where we started

In 2023 we had six languages and a set of JSON files: one per language, with English as the source. A small script compared the files, sent new English strings to DeepL, wrote the translations back and removed what was no longer used. Translating a few hundred sentences went from weeks to seconds, and adding a text became a matter of writing it in English and running the script.

It worked, but every text lived in the code. Changing a word on the site meant a developer, a commit and a deploy.

How it works now

The texts have moved out of the code and into the backend. Every piece of text in the web shop is a placeholder: a key with an English source text and a translation per language, which can be edited without touching the code.

When a new text is added, the English comes first. If nobody has written it yet, Claude suggests a first English label based on what the key says it is, like offer.delivery_week. That suggestion is a starting point for a person to read, not the final text. From that English text, DeepL fills in the other eight languages. Product names and trade terms are marked so they come through untranslated, and the texts that really matter still get a human check.

We picked DeepL over Google Translate because its output was simply better for our kind of text.

A "We all scream for ice cream" sticker

What we learned

The main thing we learned: get the English right. A machine translates exactly what you give it, so a vague English text turns into nine vague translations. “Cart” can be something you push around a shop or something you ride in; a little more context in the English makes all the translations better at once.

Waiting for translations used to slow down every change. Now new text shows up in all nine languages as soon as the English is done, and we only check by hand where it really matters.

Let's talk spirits & software

Curious what we do, or what we could do for you? We'd like to hear from you.