Translating configuration

Last updated on
11 October 2025

About

The Configuration Translation module (part of Drupal Core since Drupal 8) allows configuration to be translated into different languages. Views, your site name, contact module categories, vocabularies, menus, blocks, and so on are all stored within the unified configuration system and can be translated with this module. Content, such as nodes, taxonomy terms, custom blocks, and so on are translatable with the Content Translation module in Drupal core, while the built-in user interface (such as registration forms, content submission and administration interfaces) are translated with the Interface Translation module. Use these three modules effectively together to translate your whole site to different languages.

Configuration translation relies on having a correct configuration schema to provide translations. So, every module must provide a correct schema.

Uses

Translating

To translate configuration items, select the translate tab when viewing the configuration, select the language for which you wish to provide translations and then enter the content.

Translatable configuration elements

  1. Block
  2. Comment fields
  3. Comment type
  4. Configuration entity type
  5. Contact form
  6. Contact message fields
  7. Content fields
  8. Content type
  9. Custom block fields
  10. Custom block type
  11. Date format
  12. Form mode
  13. Image style
  14. Language
  15. Menu
  16. Role
  17. Search page
  18. Shortcut set
  19. Taxonomy term fields
  20. Taxonomy vocabulary
  21. Text format
  22. User fields
  23. View
  24. View mode
  25. Account settings
  26. RSS publishing
  27. System information
  28. System maintenance

Alternative solution: Make configuration elements translatable

Some strings, such as Views block titles and custom menu titles are considered configuration elements, and are not translatable via Interface Translation.

As an alternative to dealing with their translations through configuration, you can instead make the relevant strings translatable, by adding the Twig |trans function to labels and titles in Twig templates files.

For example, to make Views generated block titles and menu titles translatable, copy the template files to your custom theme (see below), and override the original mark up. Use Twig debug to check for the right file, and possible file names in the source.

There are two great benefits:

  1. Configuration translation can be replaced with interface translation.
  2. All translations can be deployed from a .po file, using the method in How-to deploy Drupal interface translations.

Views block labels and menu titles will now automatically pick up any translations. Olivero theme files are used for examples.

See #3549927: Streamline translation of Views block titles, custom menu titles, etc.: Allow Interface Translation.

Deploying Drupal configuration translations with Drush

As opposed to Interface translations, you cannot export and import configuration translation files in Drupal core, you need to install the contrib module Config Translation PO.

You can export and import configuration translation as a .po file via the Configuration Translation admin page at /admin/config/regional/config-translation, via the Export and Import tabs.

A Drush command is underway, which works the same as locale:export and locale:import, see the issue #3439416: Added drush command for import config po file..

With these Drush commands, you can export your configuration translations locally, and import them on the server. Create the folder assets in advance.

Note that even with a relocated web root, you don't include /web when exporting, whereas on import, you need to accommodate a relocated web root.

Export translations

drush config_translation_po:export da > assets/config-translations.da.po

Import translations

drush config_translation_po:import da ../assets/config-translations.da.po

For more details, see: