# Schema Locales — Translating Editor Labels

Shopify themes have **two** locale trees. Missing the second is the #1 reason non-English merchants see English labels in the theme editor.

| File                     | Used for                                                    | Referenced from           |
| ------------------------ | ----------------------------------------------------------- | ------------------------- |
| `en.default.json`        | Storefront strings (buttons, messages, cart)                | Liquid `{{ 'key' \| t }}` |
| `en.default.schema.json` | Theme-editor labels (section names, setting labels, groups) | `{% schema %}` JSON       |

## Runtime strings → `en.default.json`

```liquid
<button>{{- 'products.product.add_to_cart' | t -}}</button>
```

```json
{
  "products": {
    "product": {
      "add_to_cart": "Add to cart"
    }
  }
}
```

## Schema strings → `en.default.schema.json`

Every `"name"`, `"label"`, and header `"content"` in a schema must use a `t:` key that resolves against the schema locale file.

```json
{% schema %}
{
  "name": "t:sections.hero_banner.name",
  "settings": [
    { "type": "header", "content": "t:sections.hero_banner.layout_header" },
    {
      "type": "range",
      "id": "height",
      "label": "t:sections.hero_banner.height.label",
      "min": 300, "max": 900, "step": 50, "unit": "px", "default": 600
    }
  ],
  "presets": [
    { "name": "t:sections.hero_banner.presets.default" }
  ]
}
{% endschema %}
```

```json
{
  "sections": {
    "hero_banner": {
      "name": "Hero banner",
      "layout_header": "Layout",
      "height": {
        "label": "Height"
      },
      "presets": {
        "default": "Hero banner"
      }
    }
  }
}
```

## Rules

- Hardcoded strings in `"name"` / `"label"` / `"content"` → **broken** for non-English merchants. Always use `t:` keys.
- Schema locale files must exist per language: `en.default.schema.json`, `fr.schema.json`, `de.schema.json`, etc.
- Keys are separate namespaces — a storefront string at `products.product.add_to_cart` does **not** resolve inside `{% schema %}`.
- See `liquid-translation-strings.md` for storefront translation rules.
