Translations
Structure for sending translations. For performance reasons, it is appropriate to indicate all translations of a metafield in a single send. It is possible to translate base fields (including SEO information if present in the primary language), metafields and files (some like barcode, sku etc cannot be translated for obvious reasons).
Both metafield and file can be identified by the key alone (key) or by the complete key in the format namespace.key.
In addition, it is possible to configure redirect URLs via the not-found-handle field to handle cases of archiving or excluding the product from a catalog (market) for each language present in the store. When a 'not_found_handle' translation is provided as an empty string (e.g. "en":""), if present the translated redirect URL will be removed.
In the example we see translations in 2 languages for the above-mentioned fields.
In stores the primary language is Italian below is a list of other languages present:
{
"data": [
{
"sku": "FS-03",
"title": {
"en": "Product title FS-03",
"fr": "Titre du produit FS-03"
},
"description": {
"en": "Product description FS-03",
"fr": "Description du produit FS-03"
},
"handle": {
"en": "product-handle-fs-03",
"fr": "produit-handle-fs-03"
},
"not-found-handle": {
"en": "/collections/all",
"fr": "/collections/all"
},
"type": {
"en": "Product type FS-03",
"fr": "Type de produit FS-03"
},
"files": {
"manual": {
"en": "https://www.orimi.com/pdf-test.pdf",
"fr": "https://www.orimi.com/pdf-test.pdf"
},
"namespace.key1": {
"en": "https://www.orimi.com/pdf-test.pdf",
"fr": "https://www.orimi.com/pdf-test.pdf"
}
},
"metafields": {
"addition_features": {
"en": "Translated metafield",
"fr": "Métachamp traduit"
},
"namespace.key2": {
"en": "Translated metafield",
"fr": "Métachamp traduit"
}
},
"optionKeys": {
"color": {
"en": "color",
"fr": "couleur"
}
},
"variants": [
{
"sku": "FS-03-1",
"optionValues": {
"color": {
"en": "Pink",
"fr": "Rose"
}
},
"files": {
"variantManual": {
"en": "https://www.orimi.com/pdf-test.pdf",
"fr": "https://www.orimi.com/pdf-test.pdf"
},
"namespace.variantKey1": {
"en": "https://www.orimi.com/pdf-test.pdf",
"fr": "https://www.orimi.com/pdf-test.pdf"
}
},
"metafields": {
"variant_addition_features": {
"en": "Translated metafield",
"fr": "Métachamp traduit"
},
"namespace.variantKey2": {
"en": "Translated metafield",
"fr": "Métachamp traduit"
}
}
}
],
"metaTitle": {
"en": "SEO Product Meta Title",
"fr": "Méta-titre du produit SEO"
},
"metaDescription": {
"en": "A detailed meta description for SEO.",
"fr": "Une méta description détaillée pour le référencement."
}
}
]
}
Destination configuration
Configure a Shopify destination and associate it with the flow, in addition to the basic data flow configuration.
| Field | Value | Notes |
|---|---|---|
Destination Type | Shopify | |
Operation | Translations | POST /egress/sync-translation-to-shopify |
GraphQL endpoint URL | https://SHOPIFYURL.myshopify.com/ | Shopify Admin GraphQL endpoint URL |
Admin API access token | shpat_CODICEALFANUMERICO | Or Client ID (API key) + Client secret — see Authentication |
Client ID (API key) | YOUR_CLIENT_ID | |
Client secret | YOUR_CLIENT_SECRET |
Deprecated — previous configuration (HTTP Adapter)
Configuration via HTTP Adapter with Base Url, Resource Path, and x-api-key header in Settings Override is deprecated. Use the Shopify destination configuration described above.
In addition to the basic data flow configuration, the following Settings Override settings were required:
| Field | Value | Notes |
|---|---|---|
Base Url | https://adapter.flowlyze.io | Adapter URL |
Resource Path | /api/adp/shopify/egress/sync-translation-to-shopify | Adapter path for translations |
Headers :: x-api-key | ********** | API key for endpoint interaction verification |
Headers :: x-shopify-graphql-url | https://SHOPIFYURL.myshopify.com/ | Shopify shop URL to connect to |
Headers :: x-shopify-access-token | shpat_CODICEALFANUMERICO | Secret of the custom app created for integration |