The import for i18n is the same as the normal import, except that you need to specify a new attribute: the GroupLang ID.

The GroupLang ID

The GroupLang ID is the Identifier for a document and its translations. For example, a document in the master language and all its translations will have the same GroupLang ID.

Import a new translation for an existing document

You can import a new translation for an existing document.

Example:  You've created a document in english (the master language) from the writing room and now you want to import a new translation in french. You just have to add the following file to your import zip.

new_$GroupLangID_$Lang ( In this example: new_WKq0ph4AACEA4M9B_fr-fr.json )

The filename needs to contains the GroupLang ID that you can find in the english document after export (WKq0ph4AACEA4M9B). $Lang is the code of the new language (fr-fr).

Import a new document and its translations

You can also import a brand new document and all of its translations by importing multiple documents as shown below. For example, if you want to import a new english document (master language) and all its translations, you will name your documents as follows:

new_Mydocument_en-us.json
new_Mydocument_fr-fr.json
new_Mydocument_es-es.json

The prismic.io import will automatically create a new GroupLang ID and link all these documents together as one set of translations.

Updating existing documents and translations

Updating existing documents or existing translations works the same as the normal import. There is no need to change the filename or specify the GroupLang ID.

Its based on the ID of the document that you can pass into the filename.

Did this answer your question?