Importing a product document in multilingual mode

Hello,

To begin with, I have created the 3 locales in prismic: English, Italian and German.
French being the primary language

I made an import of 4 files with different languages:

new_testimports_en.json
new_testimports_en-gb.json
new_testimports_de-de.json
new_testimports_it-it.json

Each of these 4 files have the same iud in common.

However, this does create 4 documents in the 4 locales, but they are not linked together. In other words, when I enter the French version and switch to the English version, there is nothing (no alternate language on the API). Each document is independent. I would like to be able to import them and have them linked together.

Here is an example of a json file:

{
"uid": "V829V-1376",
"title": [
{
"type": "heading1",
"content":
{
"text": "Michael Mokassins",
"spans":
}
}
],
"description_full": [
{
"type": "paragraph",
"content":
{
"text": "Die Michael Mokassins, eine 2009 ins Leben gerufene Hommage an den König des Dancefloor Michael Jackson, gehören zu den ikonischen Produkten des Hauses",
"spans":
}
}
],
"type": "product_post",
"lang": "de-de"

Hi @nbu,

Thanks for reaching out.

It seems you are using the import correctly as it mentioned in our documentation or I didn't spot the issue.

So to investigate this issue and, I would need your repository name and a zip file of the JSONs you are trying to import.

One thing that can help also is to list the other locales JSON files here.

Hi,
Thanks for your response.
My zip file :
Archive.zip (3.4 KB)
My repo : repettonbu

Hello @nbu

I am taking it over as Fares is off today. I will try to come back to you asap.

Thanks,
Priyanka

Hello @nbu

To translate content in different locales, you need to create a document in the master locale in the Prismic editor. And then export the document to retrieve grouplang id.

Next, prepare your translation file with this naming convention:
translate_grouplang_lang.json.

Please follow the article to translate content in bulk.

Let me know if you have any further questions.

Thanks,
Priyanka

1 Like

Hello @nbu

The following article describes the feature importing new content in multiple languages is not working the way it should work. It does import documents, but they are not connected. Documents are imported as independent content.

For the moment, the workaround I suggested above is the way.

I have reported this to our product team and will update you as I hear back from them.

Thanks,
Priyanka

We've just updated the article you're referring to so that this method can be used again: the arbitrary "groupid" used in the file naming convention needs to be a 16 characters id, this info was missing on this article.

1 Like

Thanks, i have change the file naming convention with 16 charactersn and all is ok!

Great @nbu. Feel free to reach out to us if you have any further questions.

1 Like