How to import multi-locale data via the Write API

We have created a data model with multi-locale support in Builder.io.
Now, we want to import some data into that data model via the write API.

The following screenshot shows the sample data we are using. However, only the ‘Default’ field gets updated - neither the ‘en-US’ nor the ‘pl-PL’ fields are updated.

Could you advise how we can update the ‘en-US’ and ‘pl-PL’ fields via the Write API?



Hello @york.zhang,

When uploading a localized value using the Write API, the format should include the @type specification. Here’s an example for reference:

  "data": {
    "breadcrumbTitle": {
      "@type": "@builder.io/core:LocalizedValue",
      "Default": "Default title",
      "ca-ES": "CA title",
      "en-US": "US title"
    }
  }

Reference: Adding field localization later to the model - #16 by TimG

Please give this a try and let us know if it works for you, or if you run into any issues.

Thanks,

1 Like