PHPackages                             azmolla/spell-money-multilang - 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. azmolla/spell-money-multilang

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

azmolla/spell-money-multilang
=============================

Convert numbers to words for money in Bangla, English, Hindi, Chinese, Thai, and Arabic. Extensible to any language.

1.0.7(7mo ago)39[1 issues](https://github.com/AbiruzzamanMolla/money-spell-multi-language/issues)MITPHPPHP ^8.1CI passing

Since Aug 26Pushed 7mo agoCompare

[ Source](https://github.com/AbiruzzamanMolla/money-spell-multi-language)[ Packagist](https://packagist.org/packages/azmolla/spell-money-multilang)[ Docs](https://github.com/AbiruzzamanMolla/money-spell-multi-language)[ RSS](/packages/azmolla-spell-money-multilang/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (9)Used By (0)

Spell Money (Multilingual)
==========================

[](#spell-money-multilingual)

[![Latest Stable Version](https://camo.githubusercontent.com/d8ab7a53e7583d20e248da377c596c59bd802a41d019fd9b373079722801db56/68747470733a2f2f706f7365722e707567782e6f72672f617a6d6f6c6c612f7370656c6c2d6d6f6e65792d6d756c74696c616e672f76)](https://packagist.org/packages/azmolla/spell-money-multilang)[![License](https://camo.githubusercontent.com/8fd2c76cc7b4e737f3a6ba1774f49e481d8ee31cb29b2eb168f715cacb0b9d9d/68747470733a2f2f706f7365722e707567782e6f72672f617a6d6f6c6c612f7370656c6c2d6d6f6e65792d6d756c74696c616e672f6c6963656e7365)](https://packagist.org/packages/azmolla/spell-money-multilang)[![PHP Version Require](https://camo.githubusercontent.com/bc2cabeb9238ed2635b3de7ed69331522c68f2729b64ef2874fde28cc22a7f21/68747470733a2f2f706f7365722e707567782e6f72672f617a6d6f6c6c612f7370656c6c2d6d6f6e65792d6d756c74696c616e672f726571756972652f706870)](https://packagist.org/packages/azmolla/spell-money-multilang)[![Tests](https://github.com/AbiruzzamanMolla/money-spell-multi-language/actions/workflows/tests.yml/badge.svg)](https://github.com/AbiruzzamanMolla/money-spell-multi-language/actions)

Convert numbers into words for money amounts across multiple languages. Currently supports **Bangla, English, Hindi, Chinese, Thai, and Arabic**, with proper numeral recognition. Designed to be easily extendable so you can add new languages.

---

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

[](#installation)

Install via Composer:

```
composer require azmolla/spell-money-multilang
```

---

Usage
-----

[](#usage)

```
use AzMolla\SpellMoney\SpellMoney;
use AzMolla\SpellMoney\Languages\Bangla;
use AzMolla\SpellMoney\Languages\English;
use AzMolla\SpellMoney\Languages\Hindi;
use AzMolla\SpellMoney\Languages\Chinese;
use AzMolla\SpellMoney\Languages\Thai;
use AzMolla\SpellMoney\Languages\Arabic;

// Bangla (default)
$spell = new SpellMoney(new Bangla());
echo $spell->spell("১২৩৪৫.৫০");
// বারো হাজার তিন শত পঁইতাল্লিশ টাকা পঞ্চাশ পয়সা

// English
$spell = new SpellMoney(new English());
echo $spell->spell(12345.50);
// twelve thousand three hundred forty five taka fifty paisa

// Hindi
$spell = new SpellMoney(new Hindi());
echo $spell->spell("१२३४५.५०");
// बारह हज़ार तीन सौ पैंतालीस रुपये पचास पैसा

// Chinese
$spell = new SpellMoney(new Chinese());
echo $spell->spell("１２３４５.５０");
// 一万二千三百四十五 元 五十 分

// Thai
$spell = new SpellMoney(new Thai());
echo $spell->spell("๑๒๓๔๕.๕๐");
// หนึ่งหมื่นสองพันสามร้อยสี่สิบห้า บาท ห้าสิบ สตางค์

// Arabic
$spell = new SpellMoney(new Arabic());
echo $spell->spell("١٢٣٤٥.٥٠");
// اثنا عشر ألف ثلاثمائة خمسة وأربعون جنيه خمسون قرش
```

### or

[](#or)

```
use AzMolla\SpellMoney\SpellMoney;
use AzMolla\SpellMoney\Languages\Bangla;

SpellMoney::convert("12345.50", new Bangla());
```

---

Supported Numeral Systems
-------------------------

[](#supported-numeral-systems)

LanguageDigits RecognizedExample InputExample Output**Bangla**০–৯`১২৩`এক শত তেইশ টাকা**Hindi**०–९`१२३`एक सौ तेईस रुपये**Arabic**٠–٩`١٢٣`مائة و ثلاثة و عشرون جنيه**Thai**๐–๙`๑๒๓`หนึ่งร้อยยี่สิบสาม บาท**Chinese**０–９ (fullwidth), 0–9`１２৩` or `123`一百二十三 元**English**0–9`123`one hundred twenty three taka> ✅ Both **local numerals** and **standard 0–9 digits** are supported. ✅ Each language normalizes its own digit system internally.

---

Features
--------

[](#features)

- Convert **numbers to money words** in multiple languages.
- Works with both **local numerals** and **standard digits**.
- Supports **integer + decimal amounts**.
- Currency and sub-currency names are language-specific:

    - Bangla → টাকা / পয়সা
    - Hindi → रुपये / पैसा
    - Arabic → جنيه / قرش
    - Chinese → 元 / 分
    - Thai → บาท / สตางค์
    - English → taka / paisa
- Easily extendable — just add a new `Language` class.

---

Adding a New Language
---------------------

[](#adding-a-new-language)

1. Create a class in `src/Languages/`, for example `French.php`.
2. Implement the `LanguageInterface`.

```
