arabic_num2words
arabic_num2words is a Dart library that allows you to convert integers into words in both Arabic and English, with full support for currencies and numbers up to the trillions.
๐ Features
- โ Arabic & English language support
- โ
Currency formatting (
USD,ุฑูุงู, etc.) - โ Supports very large numbers (up to a trillion)
- โ Clean and modular class-based design
- โ
Fully tested with
package:test
๐ฆ Getting Started
Add the dependency to your pubspec.yaml:
dependencies:
arabic_num2words:
git:
url: https://github.com/AbdulrahmanKhulaidi/arabic_num2words.git
Or replace with the
pub.devURL once published.
๐ก Usage Example
import 'package:arabic_num2words/arabic_num2words.dart';
void main() {
final converter = NumberToWords();
print(converter.convert(1234, language: 'ar')); // ุฃูู ูู
ุงุฆุชุงู ูุฃุฑุจุนุฉ ูุซูุงุซูู
print(converter.convert(1234, language: 'en')); // One thousand two hundred thirty-four
print(converter.convertWithCurrency(250, language: 'ar', currency: 'ุฑูุงู ูู
ูู'));
print(converter.convertWithCurrency(88, language: 'en', currency: 'USD'));
}
๐งช Testing
Run the tests:
dart test
๐ License
MIT License. Feel free to fork, modify, and contribute.
๐ค Author
qaisy dev
Ready to make your Dart apps smarter with localized number-to-word conversion!
arabic_num2words
A Dart package that converts numbers to words in Arabic and English. It supports:
- โ Arabic and English output
- โ Currency formatting
- โ Large numbers up to a trillion
๐ง Usage
import 'package:arabic_num2words/arabic_num2words.dart';
void main() {
final converter = NumberToWords();
print(converter.convert(1234, language: 'ar')); // ุฃูู ูู
ุงุฆุชุงู ูุฃุฑุจุนุฉ ูุซูุงุซูู
print(converter.convert(1234, language: 'en')); // One thousand two hundred thirty-four
print(converter.convertWithCurrency(250, language: 'ar', currency: 'ุฑูุงู ูู
ูู'));
print(converter.convertWithCurrency(88, language: 'en', currency: 'USD'));
}
โ๏ธ Author
qaisy dev */
Libraries
- arabic_num2words
- Support for doing something awesome.