Skip to main content
A new language shows shoppers your storefront in the language they choose. First you turn the language on for your company. Then you translate what shoppers see: your storefront resources (products, categories, collections, pages, and so on), your navigation menus, your theme’s own strings, such as button labels, your agreements, and your product labels. The CLI reports what isn’t translated yet, machine-translates it, and writes it back. You review the result and finish when the report comes back empty.

Before you start

  • A Fluid API token for the company, from Settings > API Tokens, or your own sign-in with fluid login. The token needs these permissions:
    • Languages update, to turn a language on.
    • Storefront update, to translate storefront resources.
    • Menus update, to translate navigation.
    • Themes update, to save theme strings and to use machine translation.
    • Agreements update, to translate agreements.
    • Categories update, to translate product labels.
  • Know the language’s code, such as fr for French or zh-TW for Traditional Chinese. fluid translations languages lists every language Fluid supports and its code.
  • Install and sign in to the CLI:
Every fluid translations command prints JSON. Failures print a JSON error on stderr and exit with a non-zero code.
Prefer to answer questions? Run fluid translations walk in a terminal. It asks for the language, offers to turn it on, shows what’s missing, and machine-translates each type in batches. You accept, edit, or skip each translation, and each one is saved as you accept it. Type < to go back, > to skip, and ? for the menu.

Steps

1

Turn on the language

This changes your company’s live configuration: shoppers can now choose French, and translations can be saved to it. The CLI asks for confirmation unless you pass --yes. If the language is already on, the output lists it under alreadyActive and nothing changes. You can turn on several at once, such as fluid translations enable fr de --yes.
2

Find what isn't translated

The report has one entry per type. Each entry gives total, missingCount, and a missing list. Every item in the list has an id and its source text in your default language. done is true only when every type is fully translated.Narrow the report with --type, for example --type products --type theme. Add --published-only to skip drafts, scheduled items, and archived items, which shoppers don’t see.
3

Machine-translate the gaps

Preview first. Without --write, nothing is saved:
Then save the translations:
--write changes live content. Theme strings publish to your storefront as soon as they’re saved. Machine translation uses Fluid AI and counts toward your company’s AI usage.--limit caps how many items of each type one run translates. Each type reports remaining, the number of items still left. Run the command again until remaining is 0 for every type. Machine translation fills text fields only. Set a per-language image or file in the next step.Each item is saved on its own. If the API refuses one, it’s listed under failed with the reason and the rest are saved; it counts toward remaining.
4

Review and correct translations

Compare an item’s default text with its translation:
Then correct a translation or fill a field by hand:
Each set changes live content. A menu item’s id is <menu id>/<item id>, a theme string’s id is its dotted key, and a theme page string’s id is <template id>/<key>, exactly as the report prints them. For long or HTML values, such as an agreement’s text, put the fields in a JSON file and pass --file. An agreement’s title and text are saved together, so the first translation of an agreement needs both.
5

Confirm nothing is left

The language is fully translated when done is true. If anything is still missing, go back to the machine-translation step for those types, or set them by hand.

What gets translated

fluid translations types prints the same list. Machine translation fills the text fields. Images and files (image_url, video_url, pdf_url) keep showing the default-language file until you set a translated one.

What the status means

A storefront item counts as translated once it has any translation in the language. If you translate only an item’s title, its other fields show the English text. Check those fields with show.

What isn’t covered

No command translates these, because Fluid has no API that translates them. Translate them in the admin, or leave them in your default language:
  • Promotions: their title, description, and terms.
  • Enrollment form fields and forms.
  • Fluid’s own product labels, “New” and “Trending”. Fluid translates them for you.
  • Theme settings written as plain text. A section setting typed straight into the page editor isn’t a translatable string yet. Use the page editor’s translate mode, which turns it into a key in your locale files; from then on, theme and theme-sections cover it.

Troubleshooting

  • “isn’t on for this company”. You tried to save to a language that’s off. Turn it on with fluid translations enable <iso> --yes.
  • A save returns 422. The language isn’t on for your company, or a field value isn’t valid. The error’s details name the field.
  • A save returns 403. Your token lacks the permission for that type. See Before you start. A theme page string returns 403 when its template is a shared or droplet template, which can’t be edited.
  • Machine translation fails or times out. Fluid AI is busy. Run the command again with a smaller --limit. Items that were already saved stay saved, and the report shows what’s left.
  • A theme save says the theme changed after it was read. Someone else saved the theme between the CLI’s read and its write, so the CLI saved nothing rather than overwrite their change. Run the command again.
  • Some items are listed under incomplete. The machine translation came back without one of their fields, even after asking again, so nothing was saved for them. Run the command again, or pass --skip <type>:<id>, such as --skip products:60311, to leave an item out and set it by hand.
  • A product change you didn’t expect. When you translate a product, any other field sent with the translation also changes the product. The CLI sends only translated fields. If you call the API directly, send only translated fields.

Use the API directly

The CLI wraps these operations, all authenticated with a Bearer token:
  1. Configure company language turns a language on, and List company languages lists them.
  2. The company list for each storefront resource, such as Company Products index, returns a languages array for every item. It names the languages the item is translated into.
  3. The company update for each resource, such as Update a Product, saves a translation when you pass lang. Read Translate storefront resources for the rules.
  4. Navigation menu items are translated through the menu API with lang. See Manage navigation menus.
  5. Theme strings are the theme’s locale files. Updates a theme resource saves locales/<iso>.json. See Localization for how themes use them.
  6. Theme page strings are a template’s translations. Updates a theme template saves them, replacing the whole object, so read the template first and merge.
  7. Updates an agreement saves a translation when you pass language_iso. Retrieves an agreement in a language answers in your default language, and says so in its language_iso, when there is no translation yet.
  8. Update Label saves a label’s title in the language you pass as lang.
Machine translation runs through Fluid AI, which has no published API reference yet. Use the CLI’s auto command for it.