Same name and namespace in other branches
  1. 8.9.x core/modules/config_translation/config_translation.api.php \hook_config_translation_info_alter()
  2. 9 core/modules/config_translation/config_translation.api.php \hook_config_translation_info_alter()

Alter existing translation tabs for translation of configuration.

This hook is useful to extend existing configuration mappers with new configuration names, for example when altering existing forms with new settings stored elsewhere. This allows the translation experience to also reflect the compound form element in one screen.

Parameters

array $info: An associative array of discovered configuration mappers. Use an entity name for the key (for entity mapping) or a unique string for configuration name list mapping. The values of the associative array are arrays themselves in the same structure as the *.config_translation.yml files.

See also

hook_translation_info()

\Drupal\config_translation\ConfigMapperManagerInterface

Related topics

2 functions implement hook_config_translation_info_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

config_translation_test_config_translation_info_alter in core/modules/config_translation/tests/modules/config_translation_test/config_translation_test.module
Implements hook_config_translation_info_alter().
node_config_translation_info_alter in core/modules/node/node.module
Implements hook_config_translation_info_alter().

File

core/modules/config_translation/config_translation.api.php, line 83
Hooks provided by the Configuration Translation module.

Code

function hook_config_translation_info_alter(&$info) {

  // Add additional site settings to the site information screen, so it shows
  // up on the translation screen. (Form alter in the elements whose values are
  // stored in this config file using regular form altering on the original
  // configuration form.)
  $info['system.site_information_settings']['names'][] = 'example.site.setting';
}