Right now we can set a default language for the field (either via :language or via arguments) but only the last mapping is taken into account.

If we do :

 $this->addFieldMapping('field_description', 'package_description')
      ->arguments(array('language'=>'en'));

    $this->addFieldMapping('field_description', 'package_description_french')
      ->arguments(array('language'=>'fr'));  

It overwrites the first mapping and gives the following warning message : Package addFieldMapping: field_description was previously mapped, overridden

Note : I'm using Field translation from the i18n module.

Comments

Letharion’s picture

Title: Have one destination per language » How to map multiple field values to different languages?
Category: feature » support

A potential workaround could be create the actual field setup the prepare method instead, allow I'm guessing migrate could have better support for this than that.

mikeryan’s picture

Title: How to map multiple field values to different languages? » Set multiple values with different languages for a field
Version: 7.x-2.4 » 7.x-2.x-dev
Category: support » feature

It's tough to see how to work such a feature into the current architecture, about all that can be done for now would be to map one language directly and populate others in prepare().

pifagor’s picture

Issue summary: View changes
Status: Active » Closed (outdated)