Languages and translation
Overview
Your agent can translate the text on your StoreFront, change the built-in messages templates show (such as checkout labels), and turn storefront languages on or off. It follows your storefront's translation glossary: the terms not to translate, required translations, tone, and words to avoid.
English is the source of every string. A text setting stores either plain English or a set of translations by language. Any enabled language without a hand translation is machine translated when the page first renders in that language.
Example requests
- "Translate the /about page into Spanish, following the storefront's glossary, and show me a preview in Spanish."
- "Change the checkout's 'Place order' button text in French."
- "Which languages are on, and what would it cost to add German?"
- "List the pages that still show machine translations in Spanish."
Commands
| Command | What it does |
|---|---|
sf i18n languages list | List the storefront's languages and codes, and the cost of enabling another |
sf i18n languages enable, disable | Turn a language on or off |
sf i18n glossary | Read the storefront's translation glossary |
sf i18n messages list, get, set, reset | Search, read, change or reset the built-in messages |
sf i18n machine | Show where each language's text comes from: hand, machine, pending or none |
cjson translations, cjson translate | List a file's text settings, and set translations for one setting, locally |
sf render --language | Render a widget in one language to check stored translations |
Language codes are three-letter codes, with UltraCart exceptions; Spanish is ESP. sf i18n languages lists the codes the storefront accepts.
Costs to be aware of
Turning a language on means it is served and machine translated, and machine translation is billed. The agent skill tells the agent to enable a language only when you want it served.
What it cannot do
- Remove a translation by deleting it from the text. A language taken out of a text setting keeps serving its last hand translation.
- Show text in a language that is not on. Text stored under a language the storefront has not enabled never shows;
sf pushwarns about it. - Change card number and CVV error messages. They come from the hosted payment fields.
What needs approval
None of the language commands are approval-gated. Every write, including enabling a language and changing a message, shows to shoppers at once and needs --live and publish permission. Translated page content is written with sf push under the usual rules. See Safety and human approval.
Related documentation
- StoreFront Languages: how multilingual storefronts work in the admin
- Checkout and My Account: built-in messages on checkout