fr-CA) or Mexican Spanish (es-MX), is a language of its own. A country can offer the regional version, its base language (fr, es), or both.
Before you start
- Per-country languages must be on for your company. Fluid turns them on. If a change answers “Choosing languages per country isn’t on for this company yet”, contact support.
- The languages must be on for your company. A country can only offer languages your company has turned on. Regional languages need per-country languages to be on too. See Add a language and Regional languages.
- Permissions. Reading needs the
company_countries.viewandcompany_languages.viewpermissions. Changing a country’s languages also needscompany_countries.update. Turning a language on needscompany_languages.update. - Install and sign in to the CLI:
error on stderr and exits with a non-zero code.
Steps
1
See what each country offers
offered: the languages shoppers there can use.excluded: your company’s languages it leaves out.links: links stored for the country. See Links between versions.revision: the version of the country’s settings that was read.
fluid countries offered-languages CA, to see one country.2
Turn on the languages you need
fr-CA. Skip this step if the languages are already on. fluid translations languages lists them with active: true.3
Set a country's languages
Name every language the country should offer:This changes live configuration. Canada now offers English and Canadian French, and leaves out every other company language. You can also separate codes with commas, such as
en,fr-CA. Without --yes, the CLI asks first, or refuses when it can’t ask.A country must offer at least one language. Run the command once for each country you want to change. A country you never change offers every company language.4
Check the result
offered lists exactly the languages you named.What shoppers see
The country is the one Fluid’s CDN keys the visit by, from where the shopper is browsing. With Canada offering English and Canadian French:
When a country leaves out your default language, the country’s first offered language is its default. The page editor’s preview follows the same rules when you choose a country.
These lists apply to storefront pages and their language menu only. Checkout and carts offer every language, whatever the shopper’s country.
Each language a country offers still needs its translations. See Add a language.
Links between versions
A link names the version of a language a country serves, such asfr → fr-CA for Canada. Links are stored and shown in links, but storefronts don’t apply them yet, so a link changes nothing for shoppers. To serve Canadian French to French-speaking shoppers in Canada, offer fr-CA and leave fr out, as in the steps above.
fluid countries offer-languages keeps a country’s links as they are.
Troubleshooting
- “isn’t on for this company”. A language you named is off. Turn it on with
fluid translations enable <iso> --yes, then run the command again. - “This company doesn’t sell in …”. Open the country first. See Open a country.
- ”… languages changed since they were read. Nothing was saved.” Someone saved the country’s languages between the CLI’s read and its write, so the CLI saved nothing rather than overwrite their change. Run
fluid countries offered-languages <country>, then run the command again. - “Choosing languages per country isn’t on for this company yet. Nothing was saved.” Fluid hasn’t turned per-country languages on for your company. Contact support.
- A new language such as Estonian (
et) isn’t listed. The newest languages are released to companies one at a time. Ask support if you need one.