PHPackages                             muhammed2020osman/spell-number - 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. [Localization &amp; i18n](/categories/localization)
4. /
5. muhammed2020osman/spell-number

ActiveLibrary[Localization &amp; i18n](/categories/localization)

muhammed2020osman/spell-number
==============================

Easily convert numbers to letters, this library supports the native PHP INTL extension with which we can easily convert numbers to letters. This library provides us with the possibility of converting only to numbers or to currency formats depending on the language to be used, this package has support in the languages in: English, es: Spanish, pt: Portuguese, fr: French, it: Italian. ro: Romanian.

00PHP

Since Aug 14Pushed 2y agoCompare

[ Source](https://github.com/muhammed2020osman/SpellNumber)[ Packagist](https://packagist.org/packages/muhammed2020osman/spell-number)[ RSS](/packages/muhammed2020osman-spell-number/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Convert Numbers to Words in Laravel
===================================

[](#convert-numbers-to-words-in-laravel)

Easily convert numbers to words in Laravel using this library, which leverages the native `PHP INTL` extension to perform conversion effortlessly. With this library, you can convert numbers to words in various languages and also obtain the value in currency format according to the selected language. Supported languages include English, Spanish, Portuguese, French, Italian, Romanian, and with the contribution of [Siros Fakhri](https://github.com/sirosfakhri), Persian (Farsi) support has been added.

⚙️ This library is compatible with Laravel versions 8.1 and higher ⚙️

[![Laravel 8.1+](https://camo.githubusercontent.com/8fa004f014caa94c46b943d75c6ca19e4ad37625bb7e6b7ac59b5cb5170275b5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d382e312532422d6f72616e67652e737667)](https://camo.githubusercontent.com/8fa004f014caa94c46b943d75c6ca19e4ad37625bb7e6b7ac59b5cb5170275b5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d382e312532422d6f72616e67652e737667)[![Laravel 9.0+](https://camo.githubusercontent.com/2181ddb1c8a54662006448a30e7bf9a3811e3b9b214fc686845e91bc3a5c2570/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d392e302532422d6f72616e67652e737667)](https://camo.githubusercontent.com/2181ddb1c8a54662006448a30e7bf9a3811e3b9b214fc686845e91bc3a5c2570/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d392e302532422d6f72616e67652e737667)[![Laravel 10.0+](https://camo.githubusercontent.com/ea36992398d46df8e4988348ff0dcb9e597ad63df0641939ff1cd31288539e7f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302e302532422d6f72616e67652e737667)](https://camo.githubusercontent.com/ea36992398d46df8e4988348ff0dcb9e597ad63df0641939ff1cd31288539e7f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302e302532422d6f72616e67652e737667)

[![SpellNumbers](https://github.com/muhammed2020osman/SpellNumber/assets/91748598/f2aea68b-fc9f-46be-ae54-a4955f0ce7a2)](https://github.com/muhammed2020osman/SpellNumber/assets/91748598/f2aea68b-fc9f-46be-ae54-a4955f0ce7a2)

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
- [Creator](#creator)
- [Contributors](#contributors)
- [License](#license)

Installation
------------

[](#installation)

To install the dependency via Composer, execute the following command:

```
composer require muhammed2020osman/spell-number
```

It's important to ensure that the `intl` extension is enabled and loaded in the environment.

Usage
-----

[](#usage)

After installing the dependency in your project, you can start using it with the following examples:

#### Knowing Supported Regional Configurations

[](#knowing-supported-regional-configurations)

To obtain the current list of languages with support, execute the following command:

```
SpellNumber::getAllLocales();
// array:7 [▼
//     0 => "en" (English)
//     1 => "es" (Spanish)
//     2 => "pt" (Portuguese)
//     3 => "fr" (French)
//     4 => "it" (Italian)
//     5 => "ro" (Romanian)
//     6 => "fa" (Farsi)
// ]
```

#### Convert Integers to Words

[](#convert-integers-to-words)

You can easily convert numbers to words by defining the regional configuration to apply. If you don't define a regional configuration, "en" (English) will be applied by default.

```
SpellNumber::value(100)->locale('es')->toLetters();
// "Cien"

SpellNumber::value(100)->locale('fa')->toLetters();
// "صد"

SpellNumber::value(100)->locale('en')->toLetters();
// "One Hundred"
```

#### Convert Floating-Point Numbers

[](#convert-floating-point-numbers)

If needed, you can pass a floating-point number as an argument to convert it to words.

```
SpellNumber::value(123456789.12)->locale('es')->toLetters();
// "Ciento Veintitrés Millones Cuatrocientos Cincuenta Y Seis Mil Setecientos Ochenta Y Nueve Con Doce"
```

#### Convert to Currency Format

[](#convert-to-currency-format)

This method can be useful for invoices, receipts, and similar scenarios. Obtain the supplied value in currency format.

```
SpellNumber::value(100)->locale('es')->currency('pesos')->toMoney();
// "Cien Pesos"

SpellNumber::value(100.12)->locale('es')->currency('Pesos')->fraction('centavos')->toMoney();
// "Cien Pesos Con Doce Centavos"

SpellNumber::value(100)->locale('fa')->currency('تومان')->toMoney();
// "صد تومان"
```

#### Other Initializer Methods

[](#other-initializer-methods)

To support version 1.X, the following initializer methods are maintained.

```
// Integer, this method strictly requires an integer value to be sent as an argument.
SpellNumber::integer(100)->locale('es')->toLetters();

// Floating-point numbers, this method strictly requires a string value as an argument.
SpellNumber::float('12345.23')->locale('es')->toLetters();
```

Creator
-------

[](#creator)

- 🇨🇴 Raúl Mauricio Uñate Castro
- Email:

Contributors
------------

[](#contributors)

[Siros Fakhri](https://github.com/sirosfakhri) (Farsi Language)

License
-------

[](#license)

This project is licensed under the [MIT License](https://choosealicense.com/licenses/mit/).

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/81825204?v=4)[muhammed2020osman](/maintainers/muhammed2020osman)[@muhammed2020osman](https://github.com/muhammed2020osman)

---

Top Contributors

[![rmunate](https://avatars.githubusercontent.com/u/91748598?v=4)](https://github.com/rmunate "rmunate (4 commits)")[![muhammed2020osman](https://avatars.githubusercontent.com/u/81825204?v=4)](https://github.com/muhammed2020osman "muhammed2020osman (2 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (2 commits)")[![SirousFakhri](https://avatars.githubusercontent.com/u/56381478?v=4)](https://github.com/SirousFakhri "SirousFakhri (1 commits)")

### Embed Badge

![Health badge](/badges/muhammed2020osman-spell-number/health.svg)

```
[![Health](https://phpackages.com/badges/muhammed2020osman-spell-number/health.svg)](https://phpackages.com/packages/muhammed2020osman-spell-number)
```

###  Alternatives

[smmoosavi/php-gettext

Wrapper for php-gettext by danilo segan. This library provides PHP functions to read MO files even when gettext is not compiled in or when appropriate locale is not present on the system.

1927.0k1](/packages/smmoosavi-php-gettext)

PHPackages © 2026

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