# Loco Translate – A solution to your translations headaches in Drupal 8

> Loco Translate provides a normalised way to collect & gather internationalisation assets & translations into & from Loco.

Source: https://antistatique.net/en/blog/loco-translate-a-solution-to-your-translations-headaches-in-drupal-8

Category: Development

# Loco Translate – A solution to your translations headaches in Drupal 8

Author(s)

[

![Kevin](https://images.statique.ch/t/w_750,h_750,c_fill,f_jpeg,q_70/wp/app/uploads/2020/12/Kevin-300x300.jpg)



](/en/agence/kevin)

[Kevin](/en/agence/kevin)2 November 2019

You probably already know, I live in Switzerland and - beside chocolate & cheese - this country has one another singularity: 4 official national languages. As a result, more than 90% of our web creations need to be **localised in at least 2 languages**.  
This peculiarity makes us **experts in the creation of multilingual websites**.

> “ Switzerland is a small, steep country, much more up and down than sideways, and is all stuck over with large brown hotels built on the cuckoo style of architecture. ”
> 
> Ernest Hemingway

At Antistatique, we work under the **DSP** model - **D**evelopment, **S**taging, and **P**roduction. This model is essential for providing the checks and balances necessary for running a high-availability production server environment efficiently.

![DSP model Process](https://images.statique.ch/t/w_750,f_jpeg,q_70/wp/app/uploads/2020/12/1_28vneombwlqaxoqy2ptnlg-1024x576.png)

Photo credit: [Atlassian](https://confluence.atlassian.com/)

The basic concept of DSP servers is simple. Developers **test their code locally** to see whether that application will run with other code.  
Once the developer is satisfied that the application is ready for prime time, the application moves to a Staging server. The **Staging server is a mirror copy of the Production** server; its primary purpose is to **test the completed application on the mirrored copy** of production to ensure that the application doesn't break the existing production server applications.

The **Staging server is the last step** before the application is ready for deployment to a production server. A final approval process follows Staging to make sure that all interested parties sign off before the application goes into production. When the application has approval, it moves to Production.

As we use multiple development environments - development, staging & production - we face an obvious issue: **our customer should update the same translation strings in multiple places**. Plus, in some cases, they might not have access to the new translations strings on the production database, not before we've released the new version of the code.

![Capture d'écran de Google translate](https://images.statique.ch/t/w_750,f_jpeg,q_70/wp/app/uploads/2020/12/translate-google-1024x210.png)

Let's be honest, translations in Drupal 8 is painful.

The idea behind **[Loco Translate](https://www.drupal.org/project/loco_translate)** comes from a need to be centralised in one single platform the translations of the same project. To achieve this goal, we chose **[Loco](https://localise.biz/)** as our SaSS translations platform.

**Warning**, when using a **single point of Translations**, the same translation strings will be used in every environment, and so **you should never change the meaning of an existing translation**.  
Example: You have a button `button.article.action` which has been translated `Download`.  
Let's say, for the next release version, the same button should mean `See more`. I recommend you to replace your old `button.article.action` by a new string `button.article.see_more`. Otherwise your customer will translate `button.article.action` into `Download` (to match the next release desired meaning) leading to a mismatching translation on the production environment.

## Translations headaches

![Bonjour en plusieurs langues](https://images.statique.ch/t/w_750,f_jpeg,q_70/wp/app/uploads/2020/12/transation-1024x576.png)

Photo credit: [Mozilla](https://blog.mozilla.org/firefox/translate-the-web/)

As you may already know, Drupal opt-in for a **Source text** based translation process.

Indeed, instead of using unique **Assets ID** (such as Symfony or Laravel via some YAML files), Drupal opt-in for a **Source text database translations**.

Let's see the difference between those 2 translations paradigms using the example of a translatable button "Add to cart":

-   Source text: `Add to cart`
-   Asset ID: `buttons.add_to_cart`

### What the F\* are Source text translations

The **Source text** translation means that original translations wrote in Drupal source-code **should match the default project language**.

```
$this->('Add to cart');

msgid "Add to cart"
msgstr "Add to cart"
```

### What the F\* are Assets ID translations

The **Assets ID** translation means that original translations wrote in Drupal source-code **does not match any language**, it's a unique key to identify a translation.

```
$this->('buttons.actions.add_to_cart');

msgid "buttons.actions.add_to_cart"
msgstr "Add to cart"
```

As you may see, the **Source text based translations** are not very convenient for developers.  
Indeed, sometimes developers are not in charge of final wording.

For this reason, we - at Antistatique - prefer to use **Assets ID based translations**.

## How does it work

**[Loco Translate](https://www.drupal.org/project/loco_translate)** is pretty easy to use.

When a new translation is created by a developer in any none-production environment, the **CI/CD process will push all new translation strings into Loco**. By doing this, we ensure **all** new translations will **immediately be available for customers to be translated**.

Then we configure **Loco Translate to periodically fetch every translations** - flagged as translated - from Loco into Drupal. With this process, we ensure all development environments (staging & production, ...) are always up-to-date with the latest translations.

![Schéma](https://images.statique.ch/t/w_750,f_jpeg,q_70/wp/app/uploads/2020/12/loco_translate-1024x612.png)

Me trying to explain how Loco Translate works

I hope you enjoyed learning this interesting concept!

I would suggest you read the [official documentation for the whole technical implementation](https://www.drupal.org/docs/8/modules/loco-translate) of the module in your Drupal 8 project.

## Sources

The [official documentation](https://www.drupal.org/docs/8/modules/loco-translate).

For the most curious, here are some sources of additional information that inspired the creation of this article.

**Drupal community** (11 October 2019). Making Your Site Multilingual.  
Retrieved from [https://www.drupal.org/docs/../../multilingual...](https://www.drupal.org/docs/user_guide/en/multilingual-chapter.html)

**Allen Jones** (27 March 2000). The Development, Staging, and Production Model.  
Retrieved from [https://www.itprotoday.com/devops-...](https://www.itprotoday.com/devops-and-software-development/development-staging-and-production-model)

**Chizoba Ogbonna** (3 February 2019). Having different variants (debug/staging/release) of your app on a single device.  
Retrieved from [https://blog.chizobaogbonna.me/having-different-...](https://blog.chizobaogbonna.me/having-different-variants-debug-staging-release-of-your-app-on-a-single-device-2efdcaaf4950)

**Drupal translation community** (11 October 2019). Translate Drupal.  
Retrieved from [https://localize.drupal.org](https://localize.drupal.org/translate/drupal8)

**Daniel Lanz** (12 April 2017). Drupal 8 – Multilanguage Improvements.  
Retrieved from [https://www.liip.ch/.../.../drupal-8-multilan...](https://www.liip.ch/en/blog/drupal-8-multilanguage-improvements)

## Have a [Drupal](https://antistatique.net/en/services/drupal) project? We can certainly help!

## More articles

Author(s)

[

![Anthony](https://images.statique.ch/t/w_750,h_750,c_fill,f_jpeg,q_70/wp/app/uploads/2024/11/anthony-1-300x300.png)



](/en/agence/anthony-salamone)

[Anthony](/en/agence/anthony-salamone)28 September 2026

### [Smashing Conference Freiburg 2026](/en/blog/smashing-conference-freiburg-2026)

Back in Freiburg for Smashing Conference 2026: AI and design systems, deeply technical CSS and HTML, and more human talks about teams and mindset. Here's what we took away.

Back in Freiburg for Smashing Conference 2026: AI and design systems, deeply technical CSS and HTML, and more human talks about teams and mindset. Here's what we took away.

[

![Smashing Conference Freiburg 2026 poster](https://images.statique.ch/t/w_750,h_500,c_fill,f_jpeg,q_70/assets/blog/smashing-2026.png)



](/en/blog/smashing-conference-freiburg-2026)

Author(s)

[

![Akira](https://images.statique.ch/t/w_750,h_750,c_fill,f_jpeg,q_70/wp/app/uploads/2025/03/akira-small-300x300.jpg)



](/en/agence/akira-kamata)

[Akira](/en/agence/akira-kamata)22 July 2026

### [Making of : “La nuit des Losers”](/en/blog/making-of-la-nuit-des-losers)

lanuitdeslosers.ch, built fast: paper wireframes, a bold hand-drawn identity, then Claude Code to prototype and ship. A mouse-tracking hero animation, a bowling game made of sponsor logos, and a few bugs we’re keeping.

lanuitdeslosers.ch, built fast: paper wireframes, a bold hand-drawn identity, then Claude Code to prototype and ship. A mouse-tracking hero animation, a bowling game made of sponsor logos, and a few bugs we’re keeping.

[

![Making of : “La nuit des Losers”](https://images.statique.ch/t/w_750,h_500,c_fill,f_jpeg,q_70/wp/app/uploads/2026/05/La-nuit-des-Losers-Teaser-1-768x576.png)



](/en/blog/making-of-la-nuit-des-losers)

Author(s)

[

![Pierre](https://images.statique.ch/t/w_750,h_750,c_fill,f_jpeg,q_70/wp/app/uploads/2020/12/Pierre-300x300.jpg)



](/en/agence/pierre)

[Pierre](/en/agence/pierre)7 July 2026

### [Dark mode: necessity or trend](/en/blog/dark-mode-necessity-or-trend)

Nous faisons le tri entre idées reçues, réalités techniques et bonnes pratiques de design.

Nous faisons le tri entre idées reçues, réalités techniques et bonnes pratiques de design.

[

![Dark mode: necessity or trend](https://images.statique.ch/t/w_750,h_500,c_fill,f_jpeg,q_70/wp/app/uploads/2026/07/1-768x384.png)



](/en/blog/dark-mode-necessity-or-trend)
