Design system/Fundamentals
Numbers, digits, and dates
Numbers use each language's own digits and separators, numeric inputs accept all three digit systems, and dates inside the app default to the Solar Hijri calendar.
In codelib/tr.tslib/session.tslib/jalali.ts
Number format
Every toLocaleString in the app is called with numLocale(), never with a fixed tag like fa-IR. numLocale() reads from the language list, so German gets a period for thousands, French a thin space, and Persian gets Persian digits with the "٬" separator. For amounts, formatAmount does the same.
normalizeDigits →1234567٫89
en-US·de-DE·tr-TR·fa-IR·ar·fr-FR·hy-AM·pt-BR·ru-RU·n.toLocaleString(numLocale())
formatAmount(480000) // lib/session.ts
normalizeDigits("۱۲۳٤") // "1234"Numeric input
Someone typing on a Persian or Arabic keyboard should be able to enter amounts and times just as they are. normalizeDigits converts Persian and Arabic digits to Latin digits before reading them. Passwords are the exception: they're never normalized, because they must come back exactly as typed.
Tabular digits
Columns of amounts and times use equal-width digits (tabular-nums) so digits line up. In tabular mode, Estedad stretched the thousands separator to the width of a digit, so a small font called Digit Separators draws only "٫", "٬", and the middle dot, and sits first in the font list.
Date
Inside the app, dates default to the Solar Hijri calendar, and formatJalali respects each user's calendar preference. Gregorian month and day names are built with Intl in the active language.
Public site pages use formatPublicDate, which depends only on the language: an English reader who has never opened the app shouldn't see a Solar Hijri date.
formatJalali·formatPublicDate·ISO·Size and behavior
font-variant-numeric: tabular-nums.select-chipyyyy-mm-ddHH:MMnormalizeDigits(q)۱۲, ١٢, and 12 are the sameinputMode="numeric" · one-time-codeDo
Show numbers with toLocaleString(numLocale()) or formatAmount.
Don't
toLocaleString("fa-IR"); German gets Persian digits too.
Do
Normalize input digits with normalizeDigits before parsing.
Don't
Number("۱۲"), which returns NaN.
Do
Amount and time columns use tabular-nums.
Don't
Proportional figures in a column; the numbers don't line up.
Related pages