Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm trying to migrate multilingual taxonomies with additional fields. Some of words fully similar in different languages therefore MigrateDestinationTerm just change the language of the existing term and translate additional fields.
About other MigrateDestination can not say anything, but they will be the same confusion.
So I decide if possible specify MigrateSQLMap subfields, for example specify a language.
Comments
Comment #1
mikeryanThe issue is that you need the language in addition to the ID to uniquely identify items, correct? You can add additional columns to the keys in MigrateSQLMap:
This will give you both sourceid1 and sourceid2 in the map table.
Comment #2
veh CreditAttribution: veh commentedI migrate data from csv file where columns are language-based term fields. Can I set value for sourceid2 directly in the MigrateSQLMap? Or I need to create columns to check language?
I set language in MigrateDestinationTerm::options.
Comment #3
mikeryanWhen providing more info to an issue marked "Postponed (maintainer needs more info)", be sure to set the status back to Active for more visibility.
Comment #4
mikeryanIn my example, above, 'style' and 'style_language' represent columns from your source data. So, if your CSV file looks something like:
then the map table would be populated like
where the destid1 values are the Drupal term IDs created for each term.
Comment #5
mikeryan