format_compact
Formats a number in compact notation with Arabic scale words, turning large numbers like 1200000 into '1.2 مليون'. Supports locale, numeral system, and compact display options.
Instructions
Format a number in compact notation with Arabic scale words (e.g. 1200000 with locale "ar" -> "1.2 مليون").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | The number to format compactly. | |
| locale | No | BCP-47 locale, e.g. 'ar', 'ar-SA', 'en'. Defaults to 'ar'. | |
| numerals | No | Numeral system: 'latn' (1234), 'arab' (Eastern Arabic ١٢٣٤), or 'arabext' (Persian/Urdu ۱۲۳۴). | |
| compactDisplay | No | Compact form: 'short' or 'long'. |