Translations
A theme does not write its interface text into the templates. It prints translation keys, and the platform replaces each key with its text in the storefront’s language.
<h1>{{ "general.contact.title" | t }}</h1><p>{{ "general.contact.subtitle" | t }}</p><h1>Contact us</h1><p>Got a question about using our service?</p>The storefront’s language
Section titled “The storefront’s language”A storefront speaks one language: the Default language of the marketplace, set in
Settings → General (/admin/settings/general). The back office offers English,
French, German and Spanish.
The locale variable holds that language’s two-letter code (en, fr, de, es),
and shop.locale the same value. Use it for the lang attribute or for a branch that
depends on the language:
{% if locale == 'fr' %}…{% endif %}Where the text comes from
Section titled “Where the text comes from”For each key, the platform looks in this order and uses the first text it finds:
- The text the marketplace saved for that key on the Translations page.
- The text the theme ships for the storefront’s language.
- The English text, from the same two places.
A key found nowhere prints nothing. Kindshare, the default theme, ships its strings in English, French, German and Spanish.
Change a text from the back office
Section titled “Change a text from the back office”-
Open Content → Theme (
/admin/themes) and click Access translations on the Translations card (/admin/translations). -
The page lists every key of the theme with its current text in the storefront’s language, grouped by section (
general,account,listing…). -
Edit the texts you need and click Save. The storefront uses them on the next page view.
The page edits the storefront’s current language only, and only the keys the theme
already has: you cannot add a new key there. A string you introduce in your own snippet
therefore has no translation to point to. Write such text directly in the template, or,
on a storefront that must switch languages one day, branch on locale.
Keys are dot-separated paths: general.breadcrumbs.home, account.login.error,
account.dashboard.vendor_sales_count.other. The first segment is the area of the
storefront. Pass the key as a quoted string; a key held in a variable works too:
{% assign key = 'general.breadcrumbs.' | append: page_type %}{{ key | t }}Plurals
Section titled “Plurals”tn chooses a plural form from a count. It appends .zero, .one, .two or .other
to the key (for a count of 0, 1, 2, and anything else) and translates the result. The
theme therefore defines one key per form:
<strong>{{ customer_orders_count }}</strong>{{ 'account.dashboard.customer_orders_count' | tn: customer_orders_count }}For a count of 1, the key read is account.dashboard.customer_orders_count.one.
Limits
Section titled “Limits”- Translation texts are plain text: they are not parsed as Liquid, and
ttakes no arguments. To insert a value, print it next to the translated text, or split the sentence into two keys. - The text is printed as it is stored. It may contain HTML on purpose; escape it with
| escapewhen you print it inside an attribute. - Content managed in the back office (listings, categories, pages, blog posts, emails) is not translated through these keys: it is written by the marketplace in its language.