Re: How to localize the product handle by using graphql api

Solved

How to localize the product handle by using graphql api

redochkaya
Shopify Partner
12 0 1

Localising a product seems to be restricted to:

 

- product title

- product description

- product meta title

- product meta description

 

However, the Shopify app (Translate & Adapt) seems to be able to translate the product handle too.

 

ksnip_20230627-183845.png

 

How can we do the same using graphql api?

 

thanks

Accepted Solution (1)

Liam
Shopify Staff
2823 310 805

This is an accepted solution.

Hi Redochkaya,

 

The ability to translate handles of products and other resources was just released this week (see this changelog post) and should be possible with the translationsRegister mutation. 

 

Hope this helps!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 3 (3)

Liam
Shopify Staff
2823 310 805

This is an accepted solution.

Hi Redochkaya,

 

The ability to translate handles of products and other resources was just released this week (see this changelog post) and should be possible with the translationsRegister mutation. 

 

Hope this helps!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

redochkaya
Shopify Partner
12 0 1

Hi Liam, the timing... what a coincidence 😀

 

The translatableResource is still not showing the product handle (api version 2023-04)

 

query {
  translatableResource(resourceId: "gid://shopify/Product/123456789") {
    resourceId
    translatableContent {
      key
      value
      digest
      locale
    }
  }
}

 

Only the 4 fields: title, desc, meta title and meta desc. Which means we can not have the digest, which means we can not register the translation. Locked

redochkaya
Shopify Partner
12 0 1

Tested today and it's working.