Multilingual Guide in Drupal 8

Enable Multilingual modules

After installation, check if all Drupal 8 Multilingual modules are enabled. If not, enabled them

Menu: Manage > Extend
Path: /admin/modules#edit-modules-multilingual


  • Configuration Translation
  • Content Translation
  • Interface Translation
  • Language

About languages

Default language is chosen during installation. Let's add more languages for kickstart multilingual setup.

Installing and Choosing Modules for Multilingual in Drupal 8

Drupal 8's Multilingual improvements

When you install Drupal 8, the first choice you'll need to make is to choose the base language for the installation. The installer will attempt to make a reasonable choice based on your browser language, and should display the page in your browser language. If you are making a multilingual site, choose one of the languages that you will be using as the installation language, and preferably not English (a non-English choice will cause some modules you'll need to be installed).

Multilingual Messages

The Message module supports the creation and rendering of messages in multiple languages. To implement multilingual messages you should enable the core Locale module and the Localization Update module.

The example below shows the French equivalent of the message text used in the Creating Message Types page. Refer back to the Message Schema page to see how multilingual message text fields are stored in the database.

Use Suggestions

TMGMT includes a mechnism to detect content dependent on the source you are about to translate. You can, therefore, let the system suggest additional elements for which to create translation job items.

Let's look at an example. Assume you are using the Media module to manage your media content. And you use the File Entity Module to have your uploaded files registered as an entity. These will have 2 standard fields attached to them (Alt text and Title text).

Translating a node with an image file attached to it will also require to translate those additional fields. Thats where suggestions come in.

To demonstrate this, set up the following modules and types:

  • install Media module, version 2 (requires file entity, latest dev version, min. version 2)
  • activate entity translation for 'file' entity type (Administration > Configuration > Regional and language > Entity translation)
  • activate translation for the fields attached to the image file entity ( Administration > File types, choose 'manage fields' for Image, edit each field and check the 'Users may translate this field' box )
  • setup a content type with an image field. Make sure to choose 'Media File Selector' as the widget for the image field. Use 'Rendered file' as the display formatter on the image field

i18n String Translation

The TMGMT method can be used to translate i18n strings. It uses all the mechanisms defined by i18n.

Once you turn on all the necessary modules (i18n, string translation, menu translation, block languages, taxonomy translation etc.), the chosen strings will show up on the Admin > Translation > Sources page. In our case Blocks, Menu and Taxonomy strings.


Subscribe with RSS Subscribe to RSS - multilingual