Hello,
my website is in frend and translate in english thanks to Translate & Adapt
I would like to get the english description.
but each time i have the error “NO Translation”
translation_url = f"https://{SHOPIFY_STORE}/admin/api/{API_VERSION}/translations.json"
params = {
"locale": "en",
"resource_type": "Product",
"resource_id": PRODUCT_ID
}
response = requests.get(translation_url, headers=headers, params=params)
data = response.json()
translations = data.get("translations", [])
body_html_en = None
for t in translations:
if t.get("key") == "body_html":
body_html_en = t.get("value")
break
if body_html_en:
print("Description anglaise trouvée :")
print(body_html_en)
else:
print("Pas de traduction anglaise disponible.")
What is the good way?
Thanks for your help
Ben