Theme locales and internationalization
Definition
Theme locales are the JSON files holding a theme's translated strings, resolved at render time by the translation filter. One set covers the copy a shopper reads and a second covers the labels a merchant sees in the theme editor. With market and locale routing, they are how one theme serves several languages and regions without being forked.
Documented at shopify.dev, theme locales.
How We've Used It
The rule is that no string a shopper reads is a literal in a template. Section copy, cart and error messages, and anything JavaScript needs are resolved through the translation filter and serialized once in the layout, so client-side code reads one object instead of carrying its own English. Routes come from Shopify's own route object for the same reason: a hard-coded cart path breaks the moment a request arrives with a locale prefix. Where a difference is regional rather than linguistic, it belongs in a market context file, so consent copy that must differ in one country is an override rather than a conditional buried in the footer.
Builds Using It
- Server-rendered page-context dataLayer, declared in the head and pushed at browser idle — Three Ships
Related Entities
- Customer account forms — the labels and consent copy inside them.
- Customer accounts — account copy that differs by market.
- Liquid section schema and settings — translated setting labels.
- JSON templates — per-market template and section overrides.