--- title: translatableResource - GraphQL Admin description: A resource that can have localized values for different languages. api_version: 2025-10 api_name: admin type: query api_type: graphql source_url: html: https://shopify.dev/docs/api/admin-graphql/latest/queries/translatableResource md: https://shopify.dev/docs/api/admin-graphql/latest/queries/translatableResource.md --- # translatable​Resource query Requires `read_translations` access scope. A resource that can have localized values for different languages. ## Arguments * resource​Id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required Find a translatable resource by ID. *** ## Possible returns * Translatable​Resource [Translatable​Resource](https://shopify.dev/docs/api/admin-graphql/latest/objects/TranslatableResource) A resource that has translatable fields. *** ## Examples * ### Retrieve existing French translations on a collection #### Description Query the \`translations\` field on the return field to check existing translations associated with a collection. #### Query ```graphql query { translatableResource(resourceId: "gid://shopify/Collection/1007901140") { resourceId translations(locale: "fr") { key value } } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/2025-10/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query { translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") { resourceId translations(locale: \"fr\") { key value } } }" }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query { translatableResource(resourceId: "gid://shopify/Collection/1007901140") { resourceId translations(locale: "fr") { key value } } }`, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query { translatableResource(resourceId: "gid://shopify/Collection/1007901140") { resourceId translations(locale: "fr") { key value } } } QUERY response = client.query(query: query) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query { translatableResource(resourceId: "gid://shopify/Collection/1007901140") { resourceId translations(locale: "fr") { key value } } }`, }); ``` #### Response ```json { "translatableResource": { "resourceId": "gid://shopify/Collection/1007901140", "translations": [ { "key": "title", "value": "la collection" } ] } } ``` * ### Retrieve existing French translations specific to a market on a collection #### Description Make use of the optional \`marketId\` argument when querying the \`translations\` field to retrieve content specific to a market. #### Query ```graphql query { translatableResource(resourceId: "gid://shopify/Collection/1007901140") { resourceId translations(locale: "fr", marketId: "gid://shopify/Market/128989799") { key value market { id name } } } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/2025-10/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query { translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") { resourceId translations(locale: \"fr\", marketId: \"gid://shopify/Market/128989799\") { key value market { id name } } } }" }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query { translatableResource(resourceId: "gid://shopify/Collection/1007901140") { resourceId translations(locale: "fr", marketId: "gid://shopify/Market/128989799") { key value market { id name } } } }`, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query { translatableResource(resourceId: "gid://shopify/Collection/1007901140") { resourceId translations(locale: "fr", marketId: "gid://shopify/Market/128989799") { key value market { id name } } } } QUERY response = client.query(query: query) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query { translatableResource(resourceId: "gid://shopify/Collection/1007901140") { resourceId translations(locale: "fr", marketId: "gid://shopify/Market/128989799") { key value market { id name } } } }`, }); ``` #### Response ```json { "translatableResource": { "resourceId": "gid://shopify/Collection/1007901140", "translations": [ { "key": "title", "value": "la collection canadienne", "market": { "id": "gid://shopify/Market/128989799", "name": "Canada" } } ] } } ``` * ### Retrieve translatable content for a collection #### Description Use this query as part of preparing to register translations. The \`digest\` value is required as an input argument when registering a translation. #### Query ```graphql query { translatableResource(resourceId: "gid://shopify/Collection/1007901140") { resourceId translatableContent { key value digest locale } } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/2025-10/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query { translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") { resourceId translatableContent { key value digest locale } } }" }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query { translatableResource(resourceId: "gid://shopify/Collection/1007901140") { resourceId translatableContent { key value digest locale } } }`, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query { translatableResource(resourceId: "gid://shopify/Collection/1007901140") { resourceId translatableContent { key value digest locale } } } QUERY response = client.query(query: query) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query { translatableResource(resourceId: "gid://shopify/Collection/1007901140") { resourceId translatableContent { key value digest locale } } }`, }); ``` #### Response ```json { "translatableResource": { "resourceId": "gid://shopify/Collection/1007901140", "translatableContent": [ { "key": "title", "value": "Featured items", "digest": "a18b34037fda5b1afd720d4b85b86a8a75b5e389452f84f5b6d2b8e210869fd7", "locale": "en" }, { "key": "body_html", "value": "Collection description", "digest": "e3fbf5a945f94e5ddbb6bef20f5e5e3a923b34bdf1eb170f770a8aa0fd163bfa", "locale": "en" }, { "key": "handle", "value": "featured", "digest": "d562318e9c2d7e6d9c70de511fbf5d3081fae3d6699eed31c3a87c5a0bc6ca51", "locale": "en" } ] } } ``` [Open in GraphiQL](http://localhost:3457/graphiql?query=query%20%7B%0A%20%20translatableResource\(resourceId%3A%20%22gid%3A%2F%2Fshopify%2FCollection%2F1007901140%22\)%20%7B%0A%20%20%20%20resourceId%0A%20%20%20%20translations\(locale%3A%20%22fr%22\)%20%7B%0A%20%20%20%20%20%20key%0A%20%20%20%20%20%20value%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D) ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query { translatableResource(resourceId: "gid://shopify/Collection/1007901140") { resourceId translations(locale: "fr") { key value } } }`, ); const json = await response.json(); return json.data; } ``` ## Response JSON ```json { "translatableResource": { "resourceId": "gid://shopify/Collection/1007901140", "translations": [ { "key": "title", "value": "la collection" } ] } } ```