Connector Improvement: Translations for the Shopify Connector
Not plannedHello, it would be super helpful if we could pull in all our product related languages. For instance, we have reports that we pull in and we only have the ability to show the English version of that report. If we could at least pull in the product titles in other languages that would be great.
Thank you!
-
Official comment
Hi David, Calvin from the Product team here!
To clarify this request, is the Product title listed in multiple languages in your Shopify instance? Do you have any API documentation you can send my way?
-
Hi Calvin, I can't believe I missed this response!
Title would be the main translation that we would be concerned with. I think with for broader use having a table called product_translations with product_id|locale|title|body_html etc might make the most sense.
Upon further investigation the rest API does not support translations so it has to be retrieved through the GraphQL. Here is a link to the documentation https://shopify.dev/docs/api/admin-graphql/2023-04/queries/translatableResource#examples-Retrieve_existing_French_translations_on_a_collection
Here is an example that I have working in postman for a single product:
{
translatableResource(resourceId: "gid://shopify/Product/6939244232900") {
resourceId
translations(locale: "es") {
key
value
}
}
}Which returns:"data": {
"translatableResource": {
"resourceId": "gid://shopify/Product/6939244232900",
"translations": [
{
"key": "title",
"value": "Accesorios Gorra - 50pz"
},
{
"key": "body_html",
"value": "<p><iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/WJC0P8RxleU?start=20\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen=\"\"></iframe></p><p>50 piezas de gorras en diferentes diseños y colores. Puede encontrar mercancia de marca pero no es garantizado. </p>"
}
]
}
}Hopefully that makes sense!
Please sign in to leave a comment.
Comments
2 comments