How do I migrate translated content? I'm working on migration from an old Drupal 8 site to new Drupal 9 site:
I developed a source plugin to get data from D8 database:
My migration works, but it doesn’t migrate all my contents and get this error:

Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '8a7e1ba8-9b75-4813-80d6-99104c82efa5' for key 'node_field__uuid__value': INSERT INTO {node} (&quot;vid&quot;, &quot;type&quot;, &quot;uuid&quot;, &quot;langcode&quot;) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array

When I debug the issue and I have found that there is some translated nodes have the same nid vid only langcode is different like the example bellow.

I added the langcode as id in my source plugin but it doesn't help:
  public function getIds() {
    return [
      'nid' =&gt; [
        'type' =&gt; 'integer',
        'alias' =&gt; 'n',
      ],
      'langcode' =&gt; [
        'type' =&gt; 'string',
        'alias' =&gt; 'n',
      ],
    ];
  }

How can i migrate those nodes ?
Used modules: Migrate/ Migrate plus / Migrate Tools .
Drupal Version : 9.0.3
I have found that there is some translated nodes have the same
nid vid only langcode is different


When using translation, that's ok and normal.

However, what's never ok and not normal:

Duplicate entry '8a7e1ba8-9b75-4813-80d6-99104c82efa5' for key
'node_field__uuid__value': INSERT INTO {node} (&quot;vid&quot;, &quot;type&quot;, &quot;uuid&quot;,
&quot;langcode&quot;)

Universally Unique IDentifier cannot be the same, has to be unique. The error is telling you that you have two or more nodes, in the node table, with the same UUID.
So either you have 2 or more Nodes in D8 with the same UUID or perhaps you have a node that was already migrated to D9, but your migration is failing to see that and skip it.
If both are on D8, when you find which nodes have the same/duplicate UUID, via Drupal delete one and re-create it. Just in case, check that the other one didn't get deleted as well because it had the same UUID.