Drupal 8 multilingual tidbits 12: English can now be translated to

Up to date as of October 16th, 2015.

There are several improvements around English in Drupal 8. As we have seen in tidbit #3, English is now optional. You don't need to have it configured. If you do have it configured, it used to be a big problem however to handle it as a "translatable language". That is, to do text replacement in English text to satisfy your project requirements. For example where Drupal says "Log in" and "Log out", clients may request to see "Sign in" and "Sign out".

Using Drupal core alone, this was possible to achieve in Drupal 7 by configuring a "Custom English" language on the site with a language code different from "en", which then allowed you to replace text with your choosing. This quickly gets confusing though because then both the old "en" English language and your new "Custom English" will show up in language selectors, etc. If you disable the "en" English, then your old content saved with that langcode will not display properly. Its a whole can of worms. You may also use String overrides, but if you are using interface translation from core anyway, using one more module for the same task for a specific language is overkill.

Drupal 8 provides a simple and effective solution for this. By default, if you have English configured, it is not available as a translation target. However, you are only one checkbox away from enabling that feature.

Go edit English and make it available for translation. This will make English behave as any other language and from then on, you can "translate" to English as well.

All strings will still fall back on the built-in English text (eg. if you also have Hungarian on the site, untranslated strings in Hungarian will fall back on Drupal built-in English text). However when English is used for display, all your overrides will be effective. (Cross-language fallbacks can be implemented in contributed modules now with Drupal 8's service architecture for string lookups).

Issues to work on

  • DONE! Even if you don't have English configured on your site, if you go edit configuration that has a language selector, it should not suddenly switch language. English needs to be present (and selected by default) in these cases. That is not currently the case. See and help with as you can.
  • DONE! With good tradition, I also found a (minor UI) bug while writing this tidbit. Submitted that at, hopefully the proposed fix will quickly land.

Drupal 8 multilingual tidbits 11: string customizations tracked

Up to date as of October 16th, 2015.

From previous tidbits, we know the Localization update module is now built-in in Drupal 8 and it is included in a deployment friendly way. We also covered the new context specific text translation APIs. There are a lot more user interface related changes and new functionality included, so let's dive into one of the more interesting ones!

We discussed how Drupal now downloads translations and updates your software translations from the Drupal community (thanks to the translation teams on However we know that not everybody is happy with the community translations proper. So another key feature we included in Drupal 8 is custom translation tracking. How does that work?

When you add or change a translation, we keep track that you did it for yourself, and when you import a translation file in the Gettext .po format (which is still possible manually), you can also specify if the translations in the file are your customisations or from the community. Although we do not store multiple translations of the same string, we keep track on each string whether it was provided locally or fetched from the community.

Why is this useful? Well, first of all, we can protect your translations from overwrites from the community. Now that translations can be automatically updated, your customisations would get lost if not properly tracked and protected. Automated updates protect your customisations using this tracking system. Second, you can identify these strings and work with them specifically. The translation interface includes filtering for customised translations and you can export only your customisations as well (see above), so you can reuse the same customisations on other sites. Nice, isn't it?

Issues to work on

Nothing I know at this time. Feel free to point out issues in the comments.

See the Drupal 8 multilingual stack at DrupalCon Prague

There are two great sessions accepted for DrupalCon Prague involved with multilingual features that you will love!

I'll talk about all the multilingual site tools in Drupal 8 that were added and improved thanks to over 800 (yes eight hundred) collaborators who keep working tirelessly so we have a fundamentally multilingual system in Drupal 8.

While Drupal 8 makes almost anything multilingual, overarching workflows and full multilingual site management tools are not included. That is where the Translation Management Tools session comes in. Come to Michael Schmid's and Christophe Galli's session to learn about the missing workflow and integration layer that is there for you in contrib.

See all the other accepted sessions for even more reasons to come at Register for the conference at

Drupal 8 multilingual tidbits 10: context specific text translation APIs

Up to date as of October 16th, 2015.

In the previous tidbit, we looked at how Drupal 8 downloads software translations automatically, but what do software translations include? There are several new translation APIs for software translation in Drupal 8. Prior Drupal versions had the rule that you should use t() and format_plural() with little exceptions. Drupal 8 has much more complexity in this area, which may be a bliss or a curse depending on how you look at it. It definitely brings translation support to several areas that were not or poorly covered before. Buckle up, this 'tidbit' is more like a deep-dive into the woods of the API!

If you are not comfortable with code-talk, your key take-away should be that we now support a bigger part of the software to translate and in more flexible ways. We'll cover configuration translation from the user perspective for example in detail in later tidbits.

Drupal 8 multilingual tidbits 9: deployment friendly automated downloads

Up to date as of October 16th, 2015.

Let's move on to improvements around the interface (shipped software) translation solutions in Drupal 8! The new version separates the responsibilities for the base language layer (Language module) from the software's translation (Interface Translation module), and largely expands on the features of the interface translation capability.

Automated translation downloads

The biggest pain in setting up Drupal for a foreign language or especially multiple foreign languages is downloading and importing all the translation files. If you have Drupal core and 50 modules and want to have your site in 3 languages, you need to manually identify the version numbers and project shortnames for the 50 projects and download translations for all three languages. 153 files in total (core included). Then all these files sitting on your desktop, you need to upload them through the web interface one by one to get them all imported to the Drupal database.

Of course this is very painful, so we built the Localization update module to automate it. It was a very logical next step to build this into Drupal 8!