diff -u b/core/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php b/core/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php --- b/core/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php @@ -121,13 +121,18 @@ * The row object to update from. */ protected function updateEntity(EntityInterface $entity, Row $row) { - // If this row has a language code and it is not the active language - // and the language manager is configurable then this is a row with a - // translation string. - if ($row->hasDestinationProperty('langcode') && - ($row->getDestinationProperty('langcode') != $this->languageManager->getCurrentLanguage()->getId()) && - ($this->languageManager instanceof ConfigurableLanguageManagerInterface)) { + // This is a translation if the language in the active config matches the + // language of this row. + $translation = FALSE; + if ($row->hasDestinationProperty('langcode')) { $config = $entity->getConfigDependencyName(); + $langcode = \Drupal::config($config)->get('langcode'); + if ($langcode != $row->getDestinationProperty('langcode')) { + $translation = TRUE; + } + } + + if ($translation) { $config_override = $this->languageManager->getLanguageConfigOverride($row->getDestinationProperty('langcode'), $config); $config_override->set(str_replace(Row::PROPERTY_SEPARATOR, '.', $row->getDestinationProperty('property')), $row->getDestinationProperty('translation')); $config_override->save();