---
title: ValidSchemaTranslations
description: >-
  Ensures translation keys in schema tags have matching entries in the default
  schema translations file.
source_url:
  html: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-schema-translations
  md: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-schema-translations.md
---

# ValidSchemaTranslations

Makes sure that every translation key (`t:`) referenced inside a `{% schema %}` tag has a matching entry in the default [schema locale file](https://shopify.dev/docs/storefronts/themes/architecture/locales/schema-locale-files).

This check inspects all string values in the schema JSON—including `name`, `label`, `info`, `category`, preset values, option labels, and any other translation-key reference—and reports any that can't be resolved.

***

## Examples

The following examples contain code snippets that either fail or pass this check.

### ✗ Fail

In the following example, the `t:sections.header.missing_key` translation key isn't defined in the default schema locale file:

```liquid
{% schema %}
{
  "name": "t:sections.header.missing_key"
}
{% endschema %}
```

## locales/en.default.schema.json

```json
{
  "sections": {
    "header": {
      "name": "Header"
    }
  }
}
```

### ✓ Pass

In the following example, every `t:` translation key used in the schema has a matching entry in the default schema locale file:

```liquid
{% schema %}
{
  "name": "t:sections.header.name",
  "settings": [
    {
      "type": "text",
      "id": "title",
      "label": "t:sections.header.settings.title.label",
      "info": "t:sections.header.settings.title.info"
    }
  ]
}
{% endschema %}
```

## locales/en.default.schema.json

```json
{
  "sections": {
    "header": {
      "name": "Header",
      "settings": {
        "title": {
          "label": "Title",
          "info": "Enter a title"
        }
      }
    }
  }
}
```

### ✗ Fail

In the following example, a translation key inside a nested `blocks` array is missing from the default schema locale file:

```liquid
{% schema %}
{
  "name": "t:sections.header.name",
  "blocks": [
    {
      "type": "text",
      "name": "t:sections.header.blocks.text.name"
    }
  ]
}
{% endschema %}
```

## locales/en.default.schema.json

```json
{
  "sections": {
    "header": {
      "name": "Header"
    }
  }
}
```

***

## Options

The following example contains the default configuration for this check:

```yaml
ValidSchemaTranslations:
  enabled: true
  severity: error
```

| Parameter | Description |
| - | - |
| `enabled` | Whether this check is enabled. |
| `severity` | The [severity](https://shopify.dev/docs/storefronts/themes/tools/theme-check/configuration#check-severity) of the check. |

***

## Disabling this check

Disabling this check isn't recommended because unresolved translation keys surface as raw `t:...` strings in the theme editor and can ship a broken merchant experience.

***
