advanced
1 min answer
A commerce platform expands across markets with different languages, scripts, currencies and layout directions. What breaks that teams do not anticipate?
Show the full answer Hide the answer
What breaks
- Layout. Translated text is routinely much longer or shorter than the source, so fixed-width components overflow or look empty. Right-to-left languages require mirroring the entire layout, not translating the strings — including icons with direction, progress indicators and navigation.
- Formatting. Dates, numbers, currency and address formats vary by locale, and hardcoded formats produce wrong meaning rather than an odd appearance. A date read as day-month in one locale and month-day in another is a booking error.
- Concatenated strings. Assembling a sentence from fragments assumes English word order and is untranslatable. Every user-facing sentence needs to be a single template with parameters.
- Pluralisation. Languages have between one and six plural forms; an
if count === 1produces wrong grammar in most of them. - Sorting and search. Collation is locale-specific, and text segmentation differs fundamentally between scripts — word-boundary assumptions that work in Latin scripts do not apply.
- Input. Name, address and phone validation built on one country's conventions rejects valid data elsewhere, and this is a conversion problem, not a cosmetic one.
The architectural decisions
- Locale as a first-class request parameter, propagated through rendering and content selection, not derived incidentally from a browser header.
- All formatting through locale-aware libraries, never manual.
- Content and code separated, so translation does not require a release.
- Logical CSS properties rather than physical, so direction mirroring is largely automatic.
- A pseudo-locale in testing that expands string length and reverses direction, which catches layout breakage before translators are involved.
The one that costs most to retrofit
Bidirectional layout. Adding right-to-left support to a codebase built with physical positioning touches essentially every component. Using logical properties from the start costs nothing and saves that entirely.