Part 3 · 2 chapters · ~20 min

Localisation and Money

Localisation as a pipeline (extraction with context, translation with glossaries and native review, CI validation of keys, plurals and placeholders, lazy catalogues, Intl, RTL and length testing, calendars and names), and money across countries: exponents and formats from different sources, tax and fee rules per country, the cross-currency screen, display rules, the client's rules and the test matrix.

7

Localisation as a pipeline

from source string to the right words on every screen
  1. Extraction: every string is a message with an id, a default and a description for translators; a build step extracts them; a lint forbids bare strings in JSX; named placeholders and ICU syntax for plurals and selects.
  2. Translation: a service with a glossary per country ("wallet" in Nigeria, "mobile money account" in Kenya), descriptions and screenshots, catalogues returned as PRs per locale, a native reviewer on the country team; machine drafts, humans approve, counsel for legal copy.
  3. Validation in CI: every key in every supported locale (or an explicit fallback); plural categories complete (Arabic has six); placeholders matching; length maxima where the layout has them. A failure blocks the release like a failed test.
  4. Loading and rendering: catalogues per locale loaded lazily (never all fourteen in the entry: the Architecture course part 5); the locale from config or the user's choice; Intl for numbers, dates, relative times, lists and plurals; ICU messages so a sentence is never concatenated (word order differs).
  5. Direction and length: logical CSS properties, dir on the root, directional icons mirrored, RTL in the design system's visual suite; a pseudo-locale that lengthens every string by 40% and accents it, because German and Finnish will.
  6. Calendars, digits, names, addresses: Intl's calendar and numberingSystem options; a single name field or culturally correct ordering; address formats per country from a library, not a fixed form. Each a config entry (part 2) and a design-system component.
LOCALISATION AS A PIPELINE
from a string in source to the right words, plural, direction and calendar on every screen in every country
swipe the figure sideways, or tap expand for full screen
1/6
extraction
Extraction: every user-facing string in source is a message with an id, a default, and a description for translators (t("transfer.review.fee", "Fee {amount}", { description: "shown below the amount on the review step" })); a build step extracts them to a source catalogue; a lint forbids a bare string in JSX. Placeholders are named ({amount}, never {0}), and ICU message syntax handles plurals and selects.
8

Money across countries

the Trust course's money, per country
  1. Exponents and formats: the config declares the exponent (NGN 2, UGX 0, KWD 3); the formatter takes the amount's currency for the digits and the user's locale for separators and symbol position; a Nigerian viewing a Kenyan balance sees KES in en-NG formatting. The exponent decides the digits and nothing else may.
  2. Tax and fees per country: a percentage with a cap, a flat fee, VAT or excise on the fee, a levy above a threshold: each a rule (part 2) evaluated with the country's rounding mode and point (the Trust course part 4), with the breakdown on the review and the receipt in the regulator's required order.
  3. Cross-currency: two currencies, two exponents, a quote with its own scale, rounding and expiry, fees on both sides, a regulator on each. The review labels every number with its currency, refreshes the quote and re-arms (the Trust course part 5), and the receipt shows both legs to the minor unit.
  4. Display rules that differ: symbol position and separators from the locale; negatives (−₦100, (₦100), ₦100-); the code over the symbol when ambiguous across a user's accounts (a dollar is many currencies); abbreviations only in charts, never on an actionable balance.
  5. The client's rules: an amount is always { amount, currency }; the formatter takes the user's locale and the amount's currency; arithmetic is server-side or through the money module with the currency's exponent; the input parses by locale to the integer; a two-currency screen labels every amount; the receipt is server-generated with both legs.
  6. The tests: a matrix of locales times currencies for format and parse; rounding per rule set with the regulator's worked examples as fixtures; the cross-currency review with a moving quote; the receipt visually in every locale and direction. The money bugs a platform ships are formatting bugs in a locale nobody on the team speaks.
the exercise
Switch your product to a pseudo-locale with 40% longer strings and RTL, and view a balance in a currency with exponent 0 and one with exponent 3. Every overflow, every wrong digit count and every bare number is a country you have not launched yet.
MONEY ACROSS COUNTRIES
exponents, formats, tax and fees per country, and the cross-currency screen
swipe the figure sideways, or tap expand for full screen
1/6
exponents, formats
Exponents and formats: NGN and KES have exponent 2, UGX 0, KWD 3; the config declares it (part 2); the formatter takes the amount's currency for the digits and the user's locale for separators and symbol position (₦250,000.00 in en-NG; 250 000,00 ₦ in fr-SN if the product ever showed naira there). Intl.NumberFormat with the currency and the locale does both; the exponent decides the digits and nothing else may.