Laravel package to convert English numbers to Bangla number or Bangla text, Bangla month name and Bangla Money Format for Laravel. Maximum possible number to covert in Bangla word is 999999999999999 Example,
Operation | English Input | Bangla Output |
---|---|---|
Text (Integer) | 21424060 | দুই কোটি চৌদ্দ লক্ষ চব্বিশ হাজার ষাট |
Text (Float) | 21424060.60 | দুই কোটি চৌদ্দ লক্ষ চব্বিশ হাজার ষাট দশমিক ছয় |
Number | 21424060.6 | ২১৪২৪০৬০.৬ |
Text Money Format | 21424060.6 | দুই কোটি চৌদ্দ লক্ষ চব্বিশ হাজার ষাট টাকা ষাট পয়সা |
Month | 04 | এপ্রিল |
Comma (Lakh) | 21424060 | ২,১৪,২৪,০৬০ |
Install the package through Composer. On the command line:
composer require lemonpatwari/number-to-bangla
You can publish via single command:
php artisan banglaNumber:install
Here you can see some example of just how simple this package is to use.
use lemonpatwari\BanglaNumber\NumberToBangla;
$numberToBangla = new NumberToBangla();
$output = $numberToBangla->bnWord(21424060); // Output: দুই কোটি চৌদ্দ লক্ষ চব্বিশ হাজার ষাট
$output = $numberToBangla->bnWord(21424060.06); // Output: দুই কোটি চৌদ্দ লক্ষ চব্বিশ হাজার ষাট দশমিক শূন্য ছয়
$output = $numberToBangla->bnMoney(21424060); // Output: দুই কোটি চৌদ্দ লক্ষ চব্বিশ হাজার ষাট টাকা
$output = $numberToBangla->bnMoney(21424060.05); // Output: দুই কোটি চৌদ্দ লক্ষ চব্বিশ হাজার ষাট টাকা ছয় পয়সা
$output = $numberToBangla->bnNum(21424060); // Output: ২১৪২৪০৬০
$output = $numberToBangla->bnNum(21424060.987); // Output: ২১৪২৪০৬০.৯৮৭
// Input Limit (1-12) Example
$output = $numberToBangla->bnMonth(4); // Output: এপ্রিল
$output = $numberToBangla->bnMonth(12); // Output: ডিসেম্বর
$output = $numberToBangla->bnCommaLakh(21424060); // Output: ২,১৪,২৪,০৬০
If you discover any issues, please email [email protected] / [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.