Assistance Required for Product Variant Translations, Theme Sections, Notifications, and Metafield Queries

Dear Shopify Partner Support Team,

we are facing some ongoing challenges and require further clarification on the following topics:

Product Variant Translations

We can successfully retrieve product option IDs, but in certain instances, we are unable to access the corresponding translatable resource or content. Specifically:

  • Are there cases where product option values are not considered translatable resources?
  • What could be the reason for missing translatable content even when product option IDs are available?

2. Theme Translations - Fetching Specific Theme Sections & Modules

we are struggling with dynamically fetching and translating specific sections of a theme.

Challenges:

  • The current theme query only retrieves basic theme details but does not expose modular data (e.g., static sections, default content, or accessibility labels).
  • We are unable to retrieve structured data for theme modules such as PageFly elements or other customizable sections.
  • Manually handling theme files to extract translations is inefficient and does not align with how apps like “Translate & Adapt” operate.

Clarifications Needed:

  • Are there specific GraphQL queries or APIs that allow fetching individual theme sections/modules and their translatable content?
  • Is there an alternative approach to dynamically extract translatable sections without having to fetch the entire theme content?

3. Notifications/Email Template Translations

We can retrieve resource IDs and translatable content for email template translations. However, the returned data does not include the template name, making it difficult to determine which notification or email template the retrieved content belongs to.

  • Is there a way to fetch the template name along with the resource ID and content via GraphQL?

4. Metafields in GraphQL

When querying metafields, we are only receiving a key named value in the response, but the metafield type is missing.

  • How can we obtain the correct metafield type in the GraphQL response?

We would appreciate any guidance, example queries, or documentation references to help us resolve these issues.

Thank you for your support!

Hey @Aayush_Soni :waving_hand:

Happy to help clarify a few things here for you for sure! Just going through your questions there:

  1. For product/variant translatable resources there are some limitations in terms of what is available as a translatable resource. In our docs here, for example, the only product option fields that are available as translatable resources are the names of the product option:

  1. Some static/default section data should be available when querying translatable resources for themes. If I run this query, I do get theme sections like footers/headers, button text, etc:
query {
  translatableResources(first: 5, resourceType: ONLINE_STORE_THEME_SETTINGS_DATA_SECTIONS) {
    edges {
      node {
        resourceId
        translatableContent {
          key
          value
          digest
          locale
        }
      }
    }
  }
}

You can switch the resourceType value to something like ONLINE_STORE_THEME_APP_EMBED, for example and that should pull app embed section data (I think this should allow you to retrieve PageFly sections, for example)

  1. Right now, for email notification template IDs, there isn’t currently a way to pull the notification template’s ID through GraphQL - that said, if you’d like to share your use case for this, I’m more than happy to touch base with our developers to check and see if this is on our roadmap

  2. For Metafield types, the easiest way to grab the type info should just be including “type” as a value when making that query either directly on the metafield resource itself or on the parent owner of the metafield like this for example:

{
  products (first:10) {
    nodes {
      id
      metafields (first:10) {
        nodes {
          id
          type
          key
          value
        }
      }
    }
  }
}

We’d end up with something like this:

odes": [
        {
          "id": "gid://shopify/Product/7330367832086",
          "metafields": {
            "nodes": [
              {
                "id": "gid://shopify/Metafield/22535709655062",
                "type": "single_line_text_field",
                "key": "test",
                "value": "2"
              }

Hope this helps/hope I’m understanding everything here correctly - just ping me here if I can help out further!

  • Alan G | Shopify Developer Support

Hi @Alan_G,

Thank you for your prompt response and support in clarifying our queries. We appreciate the insights provided.

We would like to follow up on a couple of points for further clarification:

  1. Product Variant Translations
    Based on your response, does this mean that Shopify does not allow translation of product variant values (only product option names are translatable)? If so, is there any alternative approach to handle translations for product variant values within Shopify’s framework?
  2. Email Template Translations
    Regarding email notification translations, we understand that the query we are using:

graphql

query Notifications($cursor: String) {
    translatableResources(first: 250, resourceType: EMAIL_TEMPLATE, after: $cursor) {
        edges {
            node {
                resourceId
                translatableContent {
                    key
                    value
                }
            }
        }
        pageInfo {
            hasNextPage
            endCursor
        }
    }
}

does not return the actual template names. Could you confirm if there is any workaround to map resource IDs to their corresponding template names? Otherwise, is this something Shopify is considering adding in the future?

Looking forward to your response.

Hey @Ayush - no worries, happy to help!

For your first question, you are correct there. Technically, product variants are just the combination of different product options (for example Size: Small/Colour:Blue). If you were to create a translatable resource for both the Small and Blue options independently, it should be reflected on the front end when a customer using a specific localization selects the variant that is composed of those two options.

For the second question there, the translatableContent key/value should reflect the Email Notification Template’s name. For example here’s an output using the query you shared above:

{
  "data": {
    "translatableResources": {
      "edges": [
        {
          "node": {
            "resourceId": "gid://shopify/EmailTemplate/45658177842",
            "translatableContent": [
              {
                "key": "title",
                "value": "Order {{name}} confirmed"
              },
              {

The value field’s value there (Order {{name}} confirmed) should reflect the Order confirmation email template type. Definitely understand that it’s not ideal for sure, but this could work as a workaround.

Hope this helps, let me know if I can help out further as always!

1 Like