Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

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
14 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
Community Manager
3108 344 904

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
Community Manager
3108 344 904

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
14 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
14 0 1

Tested today and it's working.