docs
/
AI skills

Site languages and currencies

What a site's languages, default language, currencies and regions really change today — the language of the site's built-in text and its language switcher, the share tags and the course player (not the words on your own pages) — which currencies the shop sells in, how its prices are converted, shown, rounded and charged, and how to run a site in another language or for another market with what exists.

Site Config has a Localisation section with languages, a default language, currencies, a default currency and a language switcher. This page says exactly what each one does, what the shop really shows and charges, and how to serve another language or market with what exists.

See it in action

Related: the share tags (og:locale) are in Site identity, SEO tags and link sharing. Stores and regions are in Business locations, hours and sales tax. Copying a page for a translation is Copy a page as a template. A site per language is Create, clone or template a site. Formatting on a page is in The AppMint JS engine on a page. The business's base currency, the other currencies it sells in and their rates are on the Currencies screen (Finance › Currencies; BusinessMade: Books › Currencies).

"Tested" means rendered on a local site in headless Chrome. Everything else is read from the code, with the file named.

What each setting does

Studio: Site Config › Localisation ("money and language", websitemint welcome-screens/site-config-form.tsx 859–889). Save changes writes the whole site record back, keeping only features from the server copy (177–194).

Field (site.data)StudioValuesWhat reads itEffect on the site
languagesLanguages offeredISO 639-1 codes, such as fr, en (dbsdk getLanguages)base-app i18n/site-language.ts; meta.tsx; the course playerthe languages a visitor may pick for the site's built-in text; og:locale when no default is set
defaultLanguageDefault language (one of languages)a codei18n/site-language.ts; meta.tsx; ContentPlayerRoute.tsxthe language the built-in text opens in; og:locale (fr → fr, fr-FR → fr_FR; none → en_US); the course player's last-choice language
languageSwitchLanguage switcher, "How visitors change language."icons, full, nonebase-app components/layout/LanguageSwitch.tsxwith two or more languages offered, a floating language button above the cart and search buttons: icons (the default) shows the flag or a globe, full the language's code; none draws none.
currenciesCurrencies offered, picked from the business's own list (its base and the currencies on Currencies). Empty reads " only".ISO 4217 codes, such as EURappengine storefront/services/site-region.service.ts currenciesthe currencies a shopper can buy in on this site. The server keeps only the base and approved currencies that have a rate; the base is always offered. Empty = the base only.
defaultCurrencyDefault currencya code; empty = the basethe samethe currency a new visitor gets when neither their own pick nor their country decides (below). Picking the base in Studio stores nothing, so the site follows the business if its base changes.
storefront.businessLocationsSite Config › Storefront › Regions this site serves (833–839)location namesthe store's region logicwhich store a shopper buys from: its products, prices, stock and tax. See Business locations. Not language, not currency.

Rates, markups and rounding are not on the site. They belong to the business: one base currency (company.data.businessProfile.currency) and one currency record for each other currency it sells in (see Money). A product's price is a number in the base currency, and its currency says so.

Language

What every page says

ValueWhere
<html lang>always enbase-app app/layout.tsx 85. Tested on a French test locale: document.documentElement.lang was en.
og:localedefaultLanguage, else languages[0], with - turned into _; else en_USapp/[[...slug]]/meta.tsx 101–102, 147. Studio stores two-letter codes, so a French site gets og:locale fr.
hreflangnone: no <link rel="alternate" hreflang> in the head, none in the sitemapmeta.tsx 117 (only canonical). Tested: 0 hreflang links. A hreflang link put in a page's own <head> ends up in the body, where search engines ignore it (Site identity).

How a visitor's language is chosen

The site's built-in text — cart, checkout, sign-in and sign-up, My Account, booking, forms, order pages, error screens, and the words inside the site's own components — is shown in one of the site's languages. 28 are translated: English, Arabic, Bengali, German, Spanish, Persian, Filipino, French, Hebrew, Hindi, Indonesian, Italian, Japanese, Korean, Malay, Dutch, Polish, Portuguese, Russian, Swahili, Tamil, Thai, Turkish, Ukrainian, Urdu, Vietnamese, Chinese (Simplified) and Chinese (Traditional) (base-app src/locales/<code>.json). A language offered with no table, or a region of one (pt-BR reads pt), falls back to its base language, then English.

The language for a visit is, in order (base-app i18n/server.ts chooseRequestLanguage, i18n/site-language.ts pickSiteLanguage):

  1. ?lang=<code> on the address, when the site offers that language. The visitor's pick is then kept in the site_lang cookie (path /, one year) for the pages after.
  2. The site_lang cookie, when the site offers it. The floating language button sets it and reloads the page.
  3. The site's defaultLanguage, else the first of languages, else English.

A language the site does not offer is never shown: ?lang=de on a site offering only French and English opens in the default. es-MX matches an offered es. In the browser the page's <html lang> and dir are set to the chosen language (rtl for Arabic, Hebrew, Persian and Urdu); the server sends lang="en" before the page runs. window.__appmintLang holds the chosen code.

What the API writes comes back in that language. Every call the site makes while it renders, and every call from the browser through the site's /api, carries the language (x-client-language from the browser to the site, then Accept-Language to the API). The API answers its messages in it: an error keeps its English error and adds localizedMessage (see Errors). Emails are not translated.

What the owner writes is shown as written. Page content, product names and descriptions, the chat widget's welcome text and email templates are not translated by any of this.

The course player (/content-player, Content Studio courses and posts) has its own switch. A post whose pages carry translations gets a language switch, with real hreflang on its links. The language shown is the one picked there (?lang=, kept on every link), else the reader's profile language, else the site's defaultLanguage, else as written (components/content-player/content-player.ts; ContentPlayerRoute.tsx). Translations are made by AI with POST business-made/training/ai/courses/<id>/translate { "languages": ["es"] } (appengine business-made/readiness-ai/readiness-ai.controller.ts). Full detail: The content player.

The site's own wm-navigation language-switch button shows only "EN" or a globe and switches nothing. To switch from a page's own markup, link to ?lang=<code>.

What can be translated

ContentTranslations
The site's built-in screens (store, checkout, sign-in, My Account, booking, forms)yes, into the 28 languages, by the visitor's language above
Course and post pagesyes, in the course player
Site pagesno. A page has one set of screens.
Products, categoriesno. Shown as written.
Email and SMS templatesno; write one template per language
Translation Manager (/translation, "translate text")Saves key/value records (datatype: translation: name = key, group, item[] = { language, value }). Nothing on the site reads them (searched base-app).

Serving another language with what exists

NeedDo this
A few pages in a second languageA page per language at its own address, such as /fr/about as a child of a fr page, or about-fr. Copy the English page with Copy a page as a template and replace its text. Put the switch in the root header as plain links (Shared header and footer).
A whole site in another language, found by search engines in that languageA separate site per language, on its own domain or subdomain (Create, clone or template a site), with that site's defaultLanguage set so og:locale matches. <html lang> still says en.
Course content in several languagesContent Studio translation, above.

Write the translated text yourself or with the person; don't machine-translate a page without saying so.

Money

Everything below is read from the code, with the file named; none of it was rendered for this page.

The business's currencies

What it isWhere
Base currencyOne per business: company.data.businessProfile.currency. Set at sign-up from the currency asked for, else the main currency of the country the sign-up came from, else USD. Changed on Currencies › Change base currency, or in BusinessMade's business profile.appengine finance/base-currency.ts; org-management.service.ts (sign-up)
Approved currenciesOne currency record per other currency the business sells in: code, markupPercent, lockedRate and lockedUntil, rounding (none, x.99, x.95, whole), driftAlertPercent (default 3). The server writes marketRate, marketRateDate, locked, drift, driftAlert and the rate in use, rate = (locked rate, or the market rate) × (1 + markup %). Rates read "1 base = rate of this currency". The base itself can't have a record.SDK models/finance/currency.ts; appengine finance/exchange-rates.service.ts
Market ratesFetched once a day for the whole platform from Frankfurter (central-bank rates), by the Exchange rates job at 06:00, which then updates every approved currency. A locked rate stays until its lockedUntil day passes. Refresh rates on the screen fetches again now.exchange-rates.service.ts
SellableThe base, plus each approved currency that has a rate in use. A currency with no market rate (and no lock) is not offered anywhere until a rate is locked.finance/sale-currency.ts sellableCurrencies

Only these currencies can be picked for a site, an order, an invoice or a bill. Products are priced in the base: the product form says "In , your base currency".

Every stored amount says its currency. Any record whose SDK schema has a top-level currency gets the base written into it on save when it is empty; a currency already stored is never relabelled. When the base changes, records saved without a currency are marked with the old base, the old base stays on the list while products are priced in it (or other currencies are in use), and every rate is worked out again from the new base. Orders, invoices and books already recorded keep their currency.

What the shop shows

WhereCurrency
Product lists, product pages, related products, price quotes, rental items and quotes, the cartthe shopper's currency (below). The server converts every price on the record: price, compare-at, tiers, variations, option prices, the calculated price, a flat shipping rate. Each record's currency names it.
Cart and checkout lines and totalsthe cart's currency, written by Intl.NumberFormat (base-app lib/money.ts formatMoney; Cart.tsx, Checkout.tsx)
The order receipt, My Account orders, gift cards, store credit, subscriptionseach record's own currency
A page's own data-format="currency"data-format-opt-currency when the element names one; else the bound record's own currency (data.currency next to data.price, the nearest one up the path); else the shopper's pick; else USD (runtime/dispatcher.ts boundCurrency)
Product JSON-LD offerpriceCurrency = the product's currency as the server sent it (the shopper's), else the shopper's pick (app/[[...slug]]/page.tsx, components/seo/JsonLd.tsx)
{{currency x}} in an email or print templatethe code given ({{currency total "EUR"}}), else the currency of the record the message is about, else USD (appengine util/handlebars-renderer.ts)

Amounts are written in the site's language for this visit (the language chosen above, else the site's default language, else en-US), not the visitor's browser setting, so the server and the browser write €1,234.50 the same way (lib/money-locale.tsx). The separators follow the language; the currency follows the record.

data-format-opt-currency labels, it doesn't convert. On a price the server already converted, it would put the wrong sign on the number. Leave it off bound prices.

window.appmint.storefront.currencies() lists the site's currencies (GET /storefront/currencies); storefront.setCurrency('EUR') sets the shopper's pick and reloads the page. storefront.config() still calls GET /storefront/config, which doesn't exist (base-app runtime/namespaces.ts).

Which currency a shopper buys in

GET /storefront/currencies (public; appengine site-region.service.ts currencies) answers { base, selected, data: [{ code, name, selected, base }] } for the site the request came through. The list is the site's currencies kept to what is sellable, with the base always in it. selected is, in order:

  1. The shopper's pick: the currency cookie (one year), set by the currency picker and sent by the site's server in x-client-info. It counts only when the site offers it.
  2. With two or more currencies offered, the currency of the country the shopper is in, when the site offers it: the country the CDN reported, else the IP's country, else the region of the browser's first language (en-GB → GB).
  3. The site's defaultCurrency, when offered.
  4. The base.

A site's list is read again after a minute, the business's currencies after 30 seconds. Every storefront price in the request is in selected.

The currency picker ("Currency: GBP — Change", base-app components/storefront/CurrencyPicker.tsx) sits in the store's toolbar beside search and sort, on the product page beside Back to Products, on the rental pages, and at the top of the cart and of checkout. It lists the site's currencies with their flag and sign; picking one sets the cookie and reloads the page. A site that offers fewer than two currencies draws none.

How prices convert

HowCode
A product price (price, compare-at, tiers, variations, rental rates)base × rate in use, then ended with the currency's rounding: none = to the currency's smallest unit (cents; whole yen), whole = nearest whole unit, x.99 / x.95 = up to the next .99 / .95 (a currency with no cents rounds to whole units)sale-currency.ts salePrice, base-currency.ts roundAmount
Fees, shipping, discounts, deposits, option add-onsbase × rate, to the smallest unit, no price endingsaleAmount
Cart totalspriced in the base first (discount thresholds, fixed discounts and shipping rates are kept in it), then each line converted and the totals added up again from the converted parts; tax at the same rate on the converted taxable amountcartInSale
A gift card productnot converted: a 25 card is 25 in the shopper's currencyproductInSale, pricing.service.ts

What checkout charges

StepCurrencyCode
The cartthe shopper's currency. The cart keeps the rate of its last update for 24 hours, then takes the rate in use. A cart moved to another currency is saved in it.appengine services/discount.service.ts calculateCart; exchange-rates.service.ts stampCurrency
The card paymentStripe: the cart's currency, set by the server from the stored cart, never from the browser; the amount must equal the cart's total. Squad: the cart's currency (Squad takes NGN and USD only). PayPal: the amount's currency the checkout passes, the cart's.storefront.service.ts checkoutStripePaymentIntent, checkoutSquadStart; base-app paypal-payment.tsx
Stripe amountsminor units: × 100 and rounded, or whole units for zero-decimal currencies (JPY, KRW, VND, CLP, XOF and 10 others)integrations/stripe/stripe-client.ts toMinor
The orderthe cart's currency and rate. A Stripe payment in another currency than the order is refused, with the card refunded.storefront.order.service.ts
Invoice, payment (transaction), refund, rental, subscription, bookingcopied from the sale they come frombase-currency.ts saleRateOf
The bookskept in the base: a sale in another currency posts at the rate it was made at, with sourceCurrency and sourceExchangeRate on the journal entrybusiness-made/ledger/posting.service.ts

Every sale stores its rate (SDK models/_sale-rate-fields.ts: on carts, checkout sessions, orders, invoices, transactions, refunds, rentals, subscriptions and event and stowbo bookings): currency, baseCurrency, exchangeRate (1 base = this many of the sale's currency; 1 for a sale in the base) and rateDate (the market day of that rate). The server writes them once and never changes them, except on a cart (the 24-hour rule above).

Gift cards and store credit hold money in the currency they were issued in and pay only orders in that currency. Store credit and points in another currency than the order are refused with Your store credit and points are in GBP and pay only orders in GBP. This order is in USD.

Sales channels. A marketplace that lists in its own currency (eBay: its site's; TikTok Shop: the shop's) gets prices converted at the business's rate for it; with no rate, nothing is sent: eBay lists in GBP, and your prices are in USD. Add GBP with its rate in Books › Currencies, then sync again. Feeds that take any currency (Google, Meta) get each price in the currency it is stored in, the base for most products (appengine sales-channel/listing-currency.ts, storefront.partner-sync.service.ts).

Ask first

  • Which site? All of this is per site.
  • Languages: which ones, which is the main one, and which pages or products must be in each. Who writes the translations?
  • Money: the business's base currency (what its prices are entered in), which other currencies it wants shoppers to pay in, and on which sites. For each extra currency: a markup on the market rate, a locked rate, a price ending (.99, .95, whole)? Which payment account takes the money (Stripe takes most currencies; Squad only NGN and USD)?
  • Regions: do different stores sell different things or prices? That's regions, not currency: Business locations.

Steps

1. Site Config: read what's set

repo_find on site ({ "data.name": "<site>" }), then repo_find_one with its id. Note languages, defaultLanguage, languageSwitch, currencies, defaultCurrency and storefront.businessLocations.

Then tell the person, in their words, what these do today (the table at the top): the language settings set the language of the site's built-in text (with the switcher when two or more are offered), the share tags and the course player, but not the words on the person's own pages; the currencies are the ones a shopper can buy in on this site, and the default is what a new visitor gets. Read the business's base and approved currencies too: repo_find on currency (code, rate, locked, rounding), and the base with call_appengine GET /finance/currencies (it answers base).

Hands on: the site's id and its current values. Check: Site Config › Localisation shows the same values.

2. Site Config: set the language and currency settings

Only when the person still wants them after step 1: the languages for the share tag or the course player, the currencies for what shoppers can pay in. repo_update on site:

{ "datatype": "site", "id": "<sk>", "patch": { "languages": ["fr", "en"], "defaultLanguage": "fr", "currencies": ["USD", "EUR"], "defaultCurrency": "EUR" } }

repo_update merges one level deep, so each key replaces that whole field. Use two-letter language codes, as Studio does; defaultLanguage must be one of languages. List the base among currencies too, as Studio does; the server offers it either way. A currency that is not the base or an approved currency with a rate is left out by the server, so add it on Currencies first (step 4). Leave defaultCurrency empty to open in the base.

Stop: on a live site this changes og:locale on every page at once, and a new currency list changes what every shopper sees and pays in within a minute. Say so and wait for yes.

Hands on: the saved values. Check: step 6's tag read shows the new og:locale.

3. Build Studio: pages in another language

For each page the person wants translated:

  1. Copy it with Copy a page as a template to its language's address (fr/<page> under a parent page named fr, or <page>-fr).
  2. Replace the text with the translation the person gave or approved. Keep the layout, links to other translated pages, and images.
  3. Give the copy its own title and description in that language (Site identity).
  4. Add a plain link switch (English · Français) to the root header or to both pages.

For a whole site per language, clone it as in Create, clone or template a site, give the clone its own domain, and set its defaultLanguage.

Stop: on a site that serves drafts, each copy is live when it is created. Name the URLs and wait for yes.

Hands on: the translated pages' ids and URLs. Check: open each one; the text is in its language and the switch links both ways.

4. Currencies: add a currency to sell in

Prices stay in the base. Never retype product prices in another currency: the server converts them.

  1. Read what's there: call_appengine GET /finance/currencies (base, ratesDate, currencies[] with rate, marketRate, locked, driftAlert, and noRate, the codes that have no rate).
  2. Preview a new one before adding it: call_appengine POST /finance/currencies/EUR/preview with { "markupPercent": 2, "rounding": "x.99" }. It answers the rate the settings give and a few of the business's products in that currency.
  3. Add it: repo_create on currency with { "code": "EUR", "markupPercent": 0, "rounding": "none", "driftAlertPercent": 3 }. The server fills in the market rate and the rate in use. Adding the base, or a code already on the list, is refused.
  4. A currency with no market rate can't be sold in until a rate is locked: repo_update with lockedRate (and lockedUntil if it should end).
  5. Then add it to the site (step 2).

Stop: a markup, lock or rounding changes every price shoppers see in that currency. Show the preview's prices and wait for yes.

Hands on: the currency's rate, and the products as the preview priced them. Check: with the site offering it, the currency picker appears on the store, and picking the currency shows the prices from the preview.

5. Build Studio: money on your own pages

Bind prices from the server's records and let the record say its currency:

<span data-bind="data.price" data-format="currency"></span>

The server has already priced the record in the shopper's currency, and data.currency next to the price names it. Don't add data-format-opt-currency to a bound price: it changes the sign without converting the number. Use it only for an amount you write into the page yourself, in the currency that amount is in. Put a picker on your own page with appmint.storefront.currencies() and appmint.storefront.setCurrency(code), or let the built-in store show its own. Never write a currency sign by hand next to a formatted value.

Hands on: nothing new. Check: open the page, pick another currency, and each price changes to that currency with a converted number.

6. Check it on the site

curl -s "https://<site host>/<slug>?cb=$RANDOM" | awk 'BEGIN{RS="</head>"} NR==1' \
  | grep -oE '<html [^>]*>|<meta property="og:locale"[^>]*>|<link [^>]*hreflang[^>]*>'

Expect <html lang="en" in the HTML (the browser sets the chosen language after load), the og:locale from step 2, and no hreflang. Open the page with ?lang=<code> in a browser: the built-in text (cart, sign-in) is in that language. For prices, open the store in a browser, pick each currency, add an item and open the cart and checkout: every amount is in the picked currency.

Hands on: the tags and prices seen. Check: they match what you told the person in step 1.

When it's done

Tell the person in one line each: which languages the site has pages in and where the switch is, what og:locale now says, that <html lang> stays en and no hreflang is sent, the base currency and the currencies the site sells in, with the rate in use for each, which one a new visitor gets, and that checkout charges the cart's currency. Name the gaps below that affect them.

What it can't do yet

  • The HTML says <html lang="en">; the chosen language is set in the browser after load, so a crawler reading the HTML sees en.
  • No hreflang on pages or in the sitemap, outside the course player.
  • The visitor's language changes only the built-in text, not the site's own pages or products, and the browser's Accept-Language is not used to pick it.
  • No page or product translation. Translation Manager records aren't read by the site.
  • No currency per region. A region (business location) decides the store, not the currency; the currency follows the shopper's pick, their country, then the site's default.
  • Prices are entered in the base only. A price list's own currency is a label: its numbers are read as base prices and converted like any other. Subscription plans are charged in the plan's own currency (the base unless set) and are not converted.
  • A currency with no rate is not sold in until a rate is locked on Currencies.
  • Shopping feeds (Google, Meta) get the stored currency, the base for most products; only marketplaces that list in their own currency (eBay, TikTok Shop) get converted prices.
  • {{currency x}} prints USD only when neither the helper nor the record names a currency.
  • appmint.storefront.config() calls a route that doesn't exist (404).

Don'ts

  • Don't tell the person that adding a language in Site Config translates their pages or products: it translates only the platform's built-in screens. Don't tell them adding a currency to the site is enough: it has to be on Currencies with a rate first.
  • Don't change product prices to "convert" them: prices stay in the base and the server converts. Change a price only with a yes per product.
  • Don't write a currency sign next to a data-format="currency" value, and don't put data-format-opt-currency on a price the server sent: it relabels the number without converting it.
  • Don't put hreflang links in a page's head; they end up in the body.
  • Don't machine-translate a page and publish it without the person reading it.
  • Don't change the base currency without the person's yes: every rate is worked out again, and records saved without a currency are marked with the old base.
  • Don't build your own checkout: the server charges the cart's currency and refuses a card payment that doesn't match the cart.