// Put the language on the row as 'language'.
$row->
setSourceProperty('language',
$row->
getSourceProperty('lt_language'
));
// Save the translation for this property.
$property_in_row =
$row->
getSourceProperty('property'
);
// Set the i18n string table for use in I18nQueryTrait.
$this->i18nStringTable = 'i18n_string';
// Get the translation for the property not already in the row and save it
// in the row.
$property_not_in_row =
($property_in_row == 'title'
) ? 'description' : 'title';
return $this->
getPropertyNotInRowTranslation($row,
$property_not_in_row, 'mlid',
$this->idMap
);
} /**
* {@inheritdoc}
*/
public function fields() { $fields =
[ 'title_translated' =>
$this->
t('Menu link title translation.'
),
'description_translated' =>
$this->
t('Menu link description translation.'
),
];
return parent::
fields() +
$fields;
}