Config Translation Add
config_translation_addAdd a translation for a Drupal config entity by writing its per-language config override. Supply config name, langcode, and translated property values.
Instructions
Translate a config entity.
config_name is {entity_type}/{entity_id}, for example
node_type/article. config_translation_list shows which entity
types this site can translate. translation is a flat map of
property to translated value.
A config entity is not a translatable entity. There is no
TranslatableInterface to call, no addTranslation(), and no
config:translation:add Drush command -- which is what this tool
tried, twice, both failing every time. Drupal keeps a config
translation as a language config override: the same config object,
overridden per language. So the entity type is resolved through the
config translation mapper to the config object it is stored as, and
that object's override for the target language is what gets written.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| langcode | Yes | ||
| config_name | Yes | ||
| translation | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||