+ $nid = $row->getSourceProperty('nid');
+ $vid = $row->getSourceProperty('vid');
+ $type = $row->getSourceProperty('type');
+
+ // If this entity was translated using Entity Translation, we need to get
+ // its source language to get the field values in the right language.
+ // The translations will be migrated by the d7_node_entity_translation
+ // migration.
+ $entity_translatable = $this->isEntityTranslatable('node') && (int) $this->variableGet('language_content_type_' . $type, 0) === 4;
+ $source_language = $this->getEntityTranslationSourceLanguage('node', $nid);
+ $language = $entity_translatable && $source_language ? $source_language : $row->getSourceProperty('language');
+