Unprecedented built-in support for diverse languages

Drupal 8 Core Multilingual Functionality

Visibility Control

Assuming that the node ID for the example page just created is 1 , then the English version will be shown when the visitor goes to the page's URL containing no ISO language code (e.g., http://example.com/node/1). The Spanish version would be viewable at http://example.com/es/node/1.

Blocks can be displayed or hidden based on the site's current language. This must be indicated on the content language configuration page noted earlier (Figure 14).

Figure 14: Block language configuration

This functionality affects core as well as custom blocks. You can, for instance, modify the site branding block to only appear when the site's language is Spanish (Figure 15).

Figure 15: Block visibility settings

Views can filter lists of content based on several options: the language specified for the view row, the original language of the content, the site's default language, the language specified for the page, and one of the languages enabled in the Regional and language settings (Figure 16).

Figure 16: View rendering language

Finally, you can add a language selector block to allow site visitors to switch easily between languages. Go to the Blocks admin area (admin/structure/block ), and for the desired region (in this example, Sidebar first of the default Bartik theme), click the Place block button. In the pop-up window, click the same-named button for the "Language switcher" block (Figure 17). Then, enable both English and Spanish, and save your changes (Figure 18).

Figure 17: Language switcher block placement
Figure 18: Language switcher block configuration

The resulting language switcher block will list both languages, and clicking either link will change the language used by Drupal for determining which version of your page is displayed (Figure 19).

Figure 19: Language switcher block

As mentioned earlier, there is so much more to the capabilities of Drupal 8 for supporting multiple natural languages in websites. But this brief introduction illustrates how internationalization is another Drupal 8 advantage that should encourage web development enthusiasts from all over the world to try it.


  1. Installing Drupal in another language: https://www.drupal.org/documentation/install/language
  2. Drupal 8 Multilingual Initiative: http://www.drupal8multilingual.org/

Buy ADMIN Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus