format_currency
Convert a numeric amount into a properly formatted Arabic currency string with the correct symbol, digit grouping, and decimal precision.
Instructions
Format a number as an Arabic currency amount with the correct symbol, grouping, and decimal precision (e.g. 1234.5 SAR -> "1,234.50 ر.س"). Handles the 2025-2026 Unicode currency-symbol transition (Saudi Riyal U+20C1, etc.).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | The monetary amount to format. | |
| locale | No | BCP-47 locale, e.g. 'ar', 'ar-SA', 'en'. Defaults to 'ar'. | |
| currency | No | ISO 4217 currency code, e.g. 'SAR', 'AED', 'KWD'. Defaults to SAR-area default. | |
| numerals | No | Numeral system: 'latn' (1234), 'arab' (Eastern Arabic ١٢٣٤), or 'arabext' (Persian/Urdu ۱۲۳۴). |