# translatableResource - admin-graphql - QUERY
Version: 2025-01

## Description
A resource that can have localized values for different languages.

### Access Scopes
`read_translations` access scope.


## Arguments
* [resourceId](/docs/api/admin-graphql/2025-01/scalars/ID): ID! - Find a translatable resource by ID.


## Returns
* [resourceId](/docs/api/admin-graphql/2025-01/scalars/ID): ID! GID of the resource.
* [translatableContent](/docs/api/admin-graphql/2025-01/objects/TranslatableContent): TranslatableContent! Translatable content.
* [translations](/docs/api/admin-graphql/2025-01/objects/Translation): Translation! Translatable content translations (includes unpublished locales).


## Examples
### Retrieve existing French translations on a collection
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { translatableResource(resourceId: \\\"gid://shopify/Collection/1007901140\\\") { resourceId translations(locale: \\\"fr\\\") { key value } } }\"\n}'\n"
Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n  data: `query {\n    translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n      resourceId\n      translations(locale: \"fr\") {\n        key\n        value\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    translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n      resourceId\n      translations(locale: \"fr\") {\n        key\n        value\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    translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n      resourceId\n      translations(locale: \"fr\") {\n        key\n        value\n      }\n    }\n  }`,\n);\n\nconst data = await response.json();\n"
Graphql query: "query {\n  translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n    resourceId\n    translations(locale: \"fr\") {\n      key\n      value\n    }\n  }\n}"
#### Graphql Input
null
#### Graphql Response
{
  "data": {
    "translatableResource": {
      "resourceId": "gid://shopify/Collection/1007901140",
      "translations": [
        {
          "key": "title",
          "value": "la collection"
        }
      ]
    }
  }
}

### Retrieve existing French translations specific to a market on a collection
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { translatableResource(resourceId: \\\"gid://shopify/Collection/1007901140\\\") { resourceId translations(locale: \\\"fr\\\", marketId: \\\"gid://shopify/Market/128989799\\\") { key value market { id name } } } }\"\n}'\n"
Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n  data: `query {\n    translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n      resourceId\n      translations(locale: \"fr\", marketId: \"gid://shopify/Market/128989799\") {\n        key\n        value\n        market {\n          id\n          name\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    translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n      resourceId\n      translations(locale: \"fr\", marketId: \"gid://shopify/Market/128989799\") {\n        key\n        value\n        market {\n          id\n          name\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    translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n      resourceId\n      translations(locale: \"fr\", marketId: \"gid://shopify/Market/128989799\") {\n        key\n        value\n        market {\n          id\n          name\n        }\n      }\n    }\n  }`,\n);\n\nconst data = await response.json();\n"
Graphql query: "query {\n  translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n    resourceId\n    translations(locale: \"fr\", marketId: \"gid://shopify/Market/128989799\") {\n      key\n      value\n      market {\n        id\n        name\n      }\n    }\n  }\n}"
#### Graphql Input
null
#### Graphql Response
{
  "data": {
    "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
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { translatableResource(resourceId: \\\"gid://shopify/Collection/1007901140\\\") { 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    translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n      resourceId\n      translatableContent {\n        key\n        value\n        digest\n        locale\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    translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n      resourceId\n      translatableContent {\n        key\n        value\n        digest\n        locale\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    translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n      resourceId\n      translatableContent {\n        key\n        value\n        digest\n        locale\n      }\n    }\n  }`,\n);\n\nconst data = await response.json();\n"
Graphql query: "query {\n  translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n    resourceId\n    translatableContent {\n      key\n      value\n      digest\n      locale\n    }\n  }\n}"
#### Graphql Input
null
#### Graphql Response
{
  "data": {
    "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"
        }
      ]
    }
  }
}