ngx-tafgeet
v2.1.0
Published
Convert currency digits into written Arabic words for angular
Downloads
12
Maintainers
Readme
Ngx-Tafgeet
Convert currency digits into written Arabic words for angular.
Installation
Using npm:
npm install ngx-tafgeet --save
Usage example
Module:
Import NgxTafgeetModule from ngx-tafgeet
import { NgxTafgeetModule } from "ngx-tafgeet";
@NgModule({
imports: [
NgxTafgeetModule.forRoot({currency: 'EGP'}) // Default currency
]
})
{{ 1000 | tafgeet }}
فقط ثمانية ألآف وخمسمائة وستون جنيه مصري وخمسة وثلاثون قرش لا غير
{{ 1000 | tafgeet: 'SAR' }}
فقط ثمانية ألآف وخمسمائة وستون ريال سعودي وخمسة وثلاثون هللة لا غير
The directive is only used in the input tag
<input type="text" Tafgeet="1000" Currency="SAR" />
Service:
import { TafgeetService } from "ngx-tafgeet";
constructor(private _TafgeetService: TafgeetService) {}
GetTafgeet(Digit, Currency?) {
return this._TafgeetService.convert(Digit, Currency)
}
Note:
If you do not write the currency, the default currency will be used
Supported Currencies:
- EGP - Egyptian Pound
- SAR - Saudi Riyal
- USD - US Dollar
- SDG - Sudanese Pound
- QAR - Qatari Riyal
- TND - Tunisian Dinar
- TRY - Turkish Lira
- AED - Emirates dirham
- AUD - Australian Dollar