How would you test locale-sensitive dates, numbers, currencies and measurements?
Answer
Choose representative locales that vary decimal and grouping separators, currency position and precision, date order, calendars, week starts and measurement systems. Verify formatting and parsing round trips, negative and zero values, large numbers and user-locale fallback. Keep storage and APIs locale-neutral where possible, and derive expected display values from trusted locale data rather than hand-written English rules.
Strong answer includes
- selects locales for distinct formatting behavior
- tests both display and parsing
- keeps persisted values separate from presentation locale
Practical example
A price formatter tested only against en-US passes with $1,234.56, but switching to de-DE reveals it renders 1.234,56 with the currency symbol on the wrong side; a test matrix that includes de-DE and a right-to-left locale like ar-EG catches both the separator swap and directional placement bugs a single-locale suite would miss.