PHPackages                             milantarami/number-to-words - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. milantarami/number-to-words

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

milantarami/number-to-words
===========================

A sweet package for converting a number to words that support Nepali &amp; International Numbering System

v1.0.1(4y ago)57.1k↓47.9%1MITPHPCI failing

Since Sep 1Pushed 4y ago1 watchersCompare

[ Source](https://github.com/milantarami/number-to-words)[ Packagist](https://packagist.org/packages/milantarami/number-to-words)[ RSS](/packages/milantarami-number-to-words/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (2)Versions (5)Used By (0)

Number to words
===============

[](#number-to-words)

[![Issues](https://camo.githubusercontent.com/314e81175f7f9657225158b208e6c54e301198358cab9cc398d6738c089c75d2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6d696c616e746172616d692f6e756d6265722d746f2d776f7264733f7374796c653d666c61742d737175617265266c6f676f3d6170707665796f72)](https://github.com/milantarami/number-to-words/issues)[![Stars](https://camo.githubusercontent.com/044a0f8dcfed335d12e844d9d4cb43608d25cc48627594987d28045b41caeccb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6d696c616e746172616d692f6e756d6265722d746f2d776f7264733f7374796c653d666c61742d737175617265266c6f676f3d6170707665796f72)](https://github.com/milantarami/number-to-words/stargazers)

Installation and setup
----------------------

[](#installation-and-setup)

You can install this package via composer using:

```
composer require milantarami/number-to-words
```

The package will automatically register its service provider for laravel 5.5.\* and above.
For below version need to register a service provider manually in `config/app.php`

```
'providers' => [

    /*
    * Package Service Providers...
    */

   MilanTarami\NumberToWordsConverter\NumberToWordsServiceProvider::class

],
```

The package will automatically load alias for laravel 5.5.\* and above.
For below version need to add alias manually in `config/app.php`

```
'aliases' => [
    .
    .
    'NumberToWords' => MilanTarami\NumberToWordsConverter\Facades\NumberToWordsFacade::class,

]
```

To publish the config file to `config/number_to_words.php` run:

```
php artisan vendor:publish --tag=number-to-words-config
```

This is the default contents of the configuration:

```
 true,

    /**
    * supported response language
    * [ English (en) / Nepali [np] ]
    * default = en
    **/

    'lang' => 'en',

    /**
    * supported Response Type
    * [ 'string', 'array' ]
    * default = string
    **/

    'response_type' => 'string',

    /**
    * supported numbering systems
    * [ Nepali Numbering System (nns) / International Numbering System (ins) ]
    * default = nns
    **/

    'numbering_system' => 'nns',

    /**
    * Monetary Units for Nepal [ in English and Nepali ]
    * ex [ 'Dollar', 'Cent ]
    **/

    'monetary_unit' => [

        'en' => [
            'Rupees', 'Paisa'
        ],
        'np' => [
            'रुपैया', 'पैसा'
        ]
    ],

];

```

Optional Paramater ( Array - available keys and values)
-------------------------------------------------------

[](#optional-paramater--array---available-keys-and-values)

   Key Description Type Avaliable Values Default     monetary\_unit\_enable Enable / Disable monetary unit in response Boolean true, false true   lang Nepali and English Languages are avaliable String en, np en   response\_type Output can be returned in String and Array Format String string, array string   numbering\_system Two Numbering System are avaliable are Nepali Numbering System (nns) and International Numbering System (ins) String nns, ins nns   monetary\_unit You can setup your custom monetary unit in output by replacing Rupees / Paisa as Dollar / Cent .  Array Use custom value as array \[ 'Dollar', 'Cent' \] Depends upon language selected  Basic Usage
-----------

[](#basic-usage)

```
echo NumberToWords::get(123456789);

//output : Twelve Crore Thirty-four Lakh Fifty-six Thousand Seven Hundred Eighty-nine Rupees and Twelve Paisa
```

Usage with config as optional paramater
---------------------------------------

[](#usage-with-config-as-optional-paramater)

### Example 1

[](#example-1)

```
$config = [
     'monetary_unit' => [ 'Dollar', 'Cent' ],
     'numbering_system' => 'ins'
 ];
 echo NumberToWords::get(123456789.12, $config);

 //output : One Hundred Twenty-three Million Four Hundred Fifty-six Thousand Seven Hundred Eighty-nine Dollar and Twelve Cent

```

### Example 2

[](#example-2)

```
$config = [
    'monetary_unit' => [ 'Dollar', 'Cent' ],
    'numbering_system' => 'ins',
    'response_type' => 'array'
];

dd(NumberToWords::get(123456789.12, $config));

//output :
array:7 [▼
 "integer" => 123456789
 "integer_in_words" => "One Hundred Twenty-three Million Four Hundred Fifty-six Thousand Seven Hundred Eighty-nine Dollar"
 "point" => 12
 "point_in_words" => "Twelve Cent"
 "original_input" => "123456789.12"
 "formatted_input" => "123,456,789.12"
 "in_words" => "One Hundred Twenty-three Million Four Hundred Fifty-six Thousand Seven Hundred Eighty-nine Dollar and Twelve Cent"
]

```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~267 days

Total

4

Last Release

1695d ago

Major Versions

v1.0.0 → v2.0.x-dev2021-02-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/bd560c8b8757bfb63833359c8c7af7389ccdb0a4053a983661669d8ddc55ee1d?d=identicon)[milantarami](/maintainers/milantarami)

---

Top Contributors

[![milantarami](https://avatars.githubusercontent.com/u/44134655?v=4)](https://github.com/milantarami "milantarami (56 commits)")

---

Tags

lakh-separatorlaravellaravel-packagenumber-to-wordsnumber-to-words-nepaliphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/milantarami-number-to-words/health.svg)

```
[![Health](https://phpackages.com/badges/milantarami-number-to-words/health.svg)](https://phpackages.com/packages/milantarami-number-to-words)
```

###  Alternatives

[richjenks/stats

Statistics library for non-statistical people

23153.8k1](/packages/richjenks-stats)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
