Hausa Number to Words in JavaScript (ha-NG) โ
Use ha-NG when your application needs Hausa number words for Nigerian invoicing, checkout flows, or documents that print totals in full words.
Locale codes:
ha-NGยท Numbering system: Short scale ยท Currency: Naira / Kobo ยท Script: Latin
Install โ
bash
npm install to-wordsBasic Conversion โ
js
import { ToWords } from 'to-words';
const tw = new ToWords({ localeCode: 'ha-NG' });
tw.convert(100);
tw.convert(1000);
tw.convert(1000000);Currency - Naira / Kobo โ
js
tw.convert(1234.56, { currency: true });
tw.convert('500.00', { currency: true, includeZeroFractional: true });Ordinal Numbers โ
js
tw.toOrdinal(1);
tw.toOrdinal(10);
tw.toOrdinal(100);Locale Codes โ
| Locale code | Country | Currency | Notes |
|---|---|---|---|
ha-NG | Nigeria | Naira / Kobo | Standard Hausa number wording |
Related โ
FAQ โ
Q: Which locale code should I use for Hausa number-to-words output? Use ha-NG.
Q: Does to-words support Hausa ordinal words? Yes. ha-NG includes ordinal mappings so toOrdinal() works without any custom suffix logic.