Translating content

The content translation module provides a method for translating content entities, such as nodes and blocks. Each content entity needs to have translation enabled, which allows you to granularly decide what properties and fields are translated.

Content translations are duplications of the existing entity but flagged with a proper language code. When a visitor uses a language code, Drupal attempts to load content entities using that language code. If a translation is not present, Drupal will render the default nontranslated entity.

Getting ready

Your Drupal site needs to have two languages enabled in order to use Content translation. Install Spanish from the Languages interface.

How to do it…

  1. Go to Extend, and install the Content ...

Get Drupal 8 Development Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.