Translations
Storefront texts and editor labels in locales/, the t filter and t: keys in JSON.
A theme speaks the language of the store it is installed in. Texts live in locales/, never in templates.
Locale files
locales/
├── en.default.json the fallback - every key must exist here
└── pl.json one file per language, same keys
{
"cart": {
"title": "Cart",
"empty": "Your cart is empty",
"items": "{{ count }} items"
}
}
The store language decides the file; a key missing in it falls back to *.default.json.
In templates
<h1>{{ 'cart.title'|t }}</h1>
<p>{{ 'cart.items'|t({ count: cart.itemCount }) }}</p>
Parameters replace {{ name }} (or %name%) in the text.
In JSON
Any text value in a schema, a template, theme.json or settings_data.json can be a key with the t: prefix - "label": "t:sections.hero.name". Editor labels and default contents of menus and widgets are translated this way when the theme is installed, so a store gets its menus in its own language.
What not to translate
Content the merchant writes - product names, page text, setting values - is theirs and is not part of locales/. Translate only what your theme itself puts on the page: buttons, labels, empty states, accessibility texts like "Skip to content".