Import New Content in Multiple Languages

Hi, I'm working on importing translated documents into Prismic repository based on the guide: Import New Content in Multiple Languages - Prismic.

Import process went well but all documents that referenced to another document via link field or a content relation field are pointing to documents in a base language. I think it is because all of links look like this:

{
  "title": "VPS-Hosting",
  "link": {
    "id": "YQ7KORIAACsA9IQ5",
    "wioUrl": "wio://documents/YQ7KORIAACsA9IQ5"
  }
}

and it should point to a newly created document which is a part of current import. Is this possible? Maybe I can use a similar pattern as for the id field or wioUrl like for the file name like so:

{
  "title": "VPS-Hosting",
  "link": {
    "id": "new_{groupid}_{lang}",
    "wioUrl": "new_{groupid}_{lang}"
  }
}

Hello @konrad.gardocki

Welcome to the Prismic community, and thanks for posting this question to us.

In JSON, there will be two different values, id and wioUrl, for the content relationship field.

An object with two properties:

  • id: the ID of the linked document
  • wioUrl: a string that takes the format wio://documents/${filename}

These properties should accept the above format only.

To import a content relationship field, the page which you want to link must be already available in your repo. Can you please check the page is available in your repository.

Thanks,
Priyanka

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.