# translatableResources - admin-graphql - QUERY Version: 2024-10 ## Description Resources that can have localized values for different languages. ### Access Scopes `read_translations` access scope. ## Arguments * [after](/docs/api/admin-graphql/2024-10/scalars/String): String - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * [before](/docs/api/admin-graphql/2024-10/scalars/String): String - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * [first](/docs/api/admin-graphql/2024-10/scalars/Int): Int - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * [last](/docs/api/admin-graphql/2024-10/scalars/Int): Int - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * [resourceType](/docs/api/admin-graphql/2024-10/enums/TranslatableResourceType): TranslatableResourceType! - Return only resources of a type. * [reverse](/docs/api/admin-graphql/2024-10/scalars/Boolean): Boolean - Reverse the order of the underlying list. ## Returns * [edges](/docs/api/admin-graphql/2024-10/objects/TranslatableResourceEdge): TranslatableResourceEdge! The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. * [nodes](/docs/api/admin-graphql/2024-10/objects/TranslatableResource): TranslatableResource! A list of nodes that are contained in TranslatableResourceEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. * [pageInfo](/docs/api/admin-graphql/2024-10/objects/PageInfo): PageInfo! An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. ## Examples ### Retrieve translatable content for the first 5 products Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { translatableResources(first: 5, resourceType: PRODUCT) { edges { node { resourceId translatableContent { key value digest locale } } } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n translatableResources(first: 5, resourceType: PRODUCT) {\n edges {\n node {\n resourceId\n translatableContent {\n key\n value\n digest\n locale\n }\n }\n }\n }\n }`,\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n query {\n translatableResources(first: 5, resourceType: PRODUCT) {\n edges {\n node {\n resourceId\n translatableContent {\n key\n value\n digest\n locale\n }\n }\n }\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n translatableResources(first: 5, resourceType: PRODUCT) {\n edges {\n node {\n resourceId\n translatableContent {\n key\n value\n digest\n locale\n }\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n translatableResources(first: 5, resourceType: PRODUCT) {\n edges {\n node {\n resourceId\n translatableContent {\n key\n value\n digest\n locale\n }\n }\n }\n }\n}" #### Graphql Input null #### Graphql Response { "data": { "translatableResources": { "edges": [ { "node": { "resourceId": "gid://shopify/Product/20995642", "translatableContent": [ { "key": "title", "value": "Element", "digest": "4e5b548d6d61f0006840aca106f7464a4b59e5a854317d5b57861b8423901bf6", "locale": "en" }, { "key": "body_html", "value": "

bad board

", "digest": "60cd8aaeeec8e14d9da0dd1ed4cff31c0bb8f9c64255adad9dc1d2140c472f3b", "locale": "en" }, { "key": "handle", "value": "element", "digest": "445929267209c034d1e324834c17e0c8305df3dcb21d1710a639ac6ca08c648b", "locale": "en" }, { "key": "product_type", "value": "Snowboards", "digest": "3c752b33c3546064f02d47978a3883019e5bef320ddbc48875318b8d76c6154b", "locale": "en" } ] } }, { "node": { "resourceId": "gid://shopify/Product/108828309", "translatableContent": [ { "key": "title", "value": "Draft", "digest": "ebf12ef47cf575b3ba9a3cc019c5310146fdac88f6d1be6618d6e91158c2f174", "locale": "en" }, { "key": "body_html", "value": "

good board

", "digest": "6e634d476ca1dde2a0992fd6f57fc48b5979c8a4ee19117044a054f9f601ae56", "locale": "en" }, { "key": "handle", "value": "draft", "digest": "7743ce348d9284d677a185f33295b92266cc435a5b5f775029b300066d26693a", "locale": "en" }, { "key": "product_type", "value": "Snowboards", "digest": "3c752b33c3546064f02d47978a3883019e5bef320ddbc48875318b8d76c6154b", "locale": "en" } ] } }, { "node": { "resourceId": "gid://shopify/Product/121709582", "translatableContent": [ { "key": "title", "value": "Boots", "digest": "929433e4be1dbd23ffc6b076da2e6f3854ccc5fe606a1e59419110b71fe0a833", "locale": "en" }, { "key": "body_html", "value": "

some boots

", "digest": "8e6907bdb64ea435ccc2874160eaa35db63c95bb5804d93ea460c3a72a68c00c", "locale": "en" }, { "key": "handle", "value": "boots", "digest": "40cafc18e93464f86d5d304e726df74311237955bcf7d99909bcef3f0bcb90bb", "locale": "en" }, { "key": "product_type", "value": "Boots", "digest": "929433e4be1dbd23ffc6b076da2e6f3854ccc5fe606a1e59419110b71fe0a833", "locale": "en" } ] } }, { "node": { "resourceId": "gid://shopify/Product/440089423", "translatableContent": [ { "key": "title", "value": "IPod Nano - 8GB", "digest": "4ce3c71c164cd0ddc7c95e7d554d9b028e6a6ed4abff8a71ad714c6f2f1a7e4a", "locale": "en" }, { "key": "body_html", "value": "

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "digest": "d3378109cc15e6d88148c52661e687203c692141fe837dbe983fd02e9b095803", "locale": "en" }, { "key": "handle", "value": "ipod-nano", "digest": "226259c06fdbf95cd3b681de6db73d0346c7dae4d381f0472c0e405b73cf57e0", "locale": "en" }, { "key": "product_type", "value": "Cult Products", "digest": "be736be3f50f1755fdc2f5bc96b10251d56cd1888a51889321cb96d605078c42", "locale": "en" } ] } }, { "node": { "resourceId": "gid://shopify/Product/558169081", "translatableContent": [ { "key": "title", "value": "Unpublished Boots", "digest": "1654ceb776b32b1bf3298e88ce86829478d3be20669887faebc98daf88ebabc0", "locale": "en" }, { "key": "body_html", "value": "

some boots

", "digest": "8e6907bdb64ea435ccc2874160eaa35db63c95bb5804d93ea460c3a72a68c00c", "locale": "en" }, { "key": "handle", "value": "unpublished_boots", "digest": "8fa116cf72ed66775134127295e199c727b3756c676b13699b2060db2f19d78c", "locale": "en" }, { "key": "product_type", "value": "Boots", "digest": "929433e4be1dbd23ffc6b076da2e6f3854ccc5fe606a1e59419110b71fe0a833", "locale": "en" } ] } } ] } } }