Urdu Number to Words in JavaScript (ur-PK) โ
Use ur-PK when your application needs right-to-left Urdu output for invoices, printed forms, cheque flows, or spoken-number interfaces in Pakistan.
Locale codes:
ur-PKยท Numbering system: Indian scale ยท Currency: Pakistani Rupee / Paisa ยท Script: Urdu (RTL)
Install โ
bash
npm install to-wordsBasic Conversion โ
js
import { ToWords } from 'to-words';
const tw = new ToWords({ localeCode: 'ur-PK' });
tw.convert(137);
tw.convert(100000); // lakh-scale wording
tw.convert(10000000); // crore-scale wordingCurrency - Pakistani Rupee / Paisa โ
js
tw.convert(452.36, { currency: true });
tw.convert('1500.00', { currency: true, includeZeroFractional: true });Ordinal Numbers โ
js
tw.toOrdinal(1);
tw.toOrdinal(11);
tw.toOrdinal(100000);RTL and Legal Output Notes โ
- Render Urdu output inside a
dir="rtl"container in HTML so punctuation and UI chrome align correctly ur-PKsupports fraction-style decimals too, which is helpful for cheque and banking language- Large values follow lakh and crore conventions instead of western million-first grouping
Locale Codes โ
| Locale code | Country | Currency | Notes |
|---|---|---|---|
ur-PK | Pakistan | Rupee / Paisa | RTL Urdu wording with lakh and crore groupings |
Related โ
FAQ โ
Q: Does to-words support Urdu RTL output? Yes. ur-PK returns Urdu script, and you should render it inside an RTL container on the web.
Q: Does the Urdu locale use lakh and crore? Yes. ur-PK follows South Asian numbering with lakh and crore scale words.