Language overrides

Although we will talk some more about the multilingual features of Drupal 8, let's briefly note the possibility of the language overrides.

If we enable configuration translation and add some more languages to our site, we can translate configuration items which are translatable (as described by their schema). In doing so, we are overriding the default configuration for a particular language, an override that gets stored in the configuration storage and can be exported to YAML files. So, this is an exportable type of override.

We can make use of this override programmatically, even if we are not in a specific language context. This is what the code would look like assuming we have an override in French for our maintenance ...

Get Drupal 8 Module Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.