PHPackages                             hamoi1/kurdish-converter - 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. hamoi1/kurdish-converter

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

hamoi1/kurdish-converter
========================

This package provides a comprehensive solution for converting numbers into Kurdish Sorani words, making it easier to work with numbers in applications that require Kurdish language support. Convert English numbers to Kurdish Sorani text, currency, time, ordinal, percentage, and more.

11PHP

Since Jun 15Pushed 11mo agoCompare

[ Source](https://github.com/Hamoi1/kurdish-converter)[ Packagist](https://packagist.org/packages/hamoi1/kurdish-converter)[ RSS](/packages/hamoi1-kurdish-converter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Kurdish Converter
=================

[](#kurdish-converter)

 [![PHP Version](https://camo.githubusercontent.com/5188a1962930aba4ca73a52dff45e740ac96f29bba7e247799282b5e626eecb9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332b2d3737374242343f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/5188a1962930aba4ca73a52dff45e740ac96f29bba7e247799282b5e626eecb9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332b2d3737374242343f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465) [![Laravel Version](https://camo.githubusercontent.com/6e2d50acf2689a07d3516948827a7a45d1df0b8a6e4db945c2c69f2e2cc9f04c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302e302532422d4646324432303f7374796c653d666f722d7468652d6261646765266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/6e2d50acf2689a07d3516948827a7a45d1df0b8a6e4db945c2c69f2e2cc9f04c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302e302532422d4646324432303f7374796c653d666f722d7468652d6261646765266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465) [![License](https://camo.githubusercontent.com/153acf9dff19deb8abfc598c53bac50a4ceae0f5c83a552711060d3d78d2c057/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e3f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/153acf9dff19deb8abfc598c53bac50a4ceae0f5c83a552711060d3d78d2c057/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e3f7374796c653d666f722d7468652d6261646765) [![Version](https://camo.githubusercontent.com/85c6f03eeb486385807702fc79dfdd656d12a452fc4f9ff6a0efc8c1881da189/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f56657273696f6e2d302e312d626c75653f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/85c6f03eeb486385807702fc79dfdd656d12a452fc4f9ff6a0efc8c1881da189/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f56657273696f6e2d302e312d626c75653f7374796c653d666f722d7468652d6261646765)

 🌟 A comprehensive PHP package for converting numbers, currencies, time, and more into Kurdish Sorani language 🌟

---

📖 Description
-------------

[](#-description)

**Kurdish Converter** is a powerful Laravel package that provides seamless conversion of numbers, currencies, time formats, ordinals, and percentages into beautiful Kurdish Sorani text. Perfect for applications targeting Kurdish-speaking users, this package makes it easy to localize your numeric data.

✨ Features
----------

[](#-features)

- 🔢 **Number to Words**: Convert integers and floats to Kurdish Sorani words
- 💰 **Currency Formatting**: Format monetary amounts with Kurdish currency names
- 🕐 **Time Conversion**: Convert time formats to Kurdish expressions
- 📊 **Percentage Formatting**: Display percentages in Kurdish format
- 🔢 **Digit Conversion**: Convert English digits to Kurdish/Arabic digits
- 📝 **Ordinal Numbers**: Convert numbers to ordinal format (first, second, etc.)
- 🛡️ **Memory Safe**: Built-in protection against memory exhaustion
- ⚡ **Laravel Integration**: Seamless Laravel service provider integration

🚀 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require hamoi1/kurdish-converter
```

### Laravel Auto-Discovery

[](#laravel-auto-discovery)

The package will automatically register its service provider. If you need to register it manually, add it to your `config/app.php`:

```
'providers' => [
    // ...
    Hamoi1\KurdishConverter\KurdishConverterServiceProvider::class,
],
```

### Publish Configuration (Optional)

[](#publish-configuration-optional)

```
php artisan vendor:publish --provider="Hamoi1\KurdishConverter\KurdishConverterServiceProvider"
```

📋 Requirements
--------------

[](#-requirements)

- PHP 8.3 or higher
- Laravel 10.0, 11.0, or 12.0

🎯 Usage
-------

[](#-usage)

### Basic Usage

[](#basic-usage)

```
use Hamoi1\KurdishConverter\Services\KurdishServiceConverter;

// Convert numbers to Kurdish words
echo KurdishServiceConverter::convertToWords(123);
// Output: سەد و بیست و سێ

// Convert digits to Kurdish/Arabic numerals
echo KurdishServiceConverter::convertDigits(12345);
// Output: ١٢٣٤٥

// Format currency
echo KurdishServiceConverter::formatCurrency(1500, 'IQD');
// Output: هەزار و پێنج سەد دینار

// Convert time
echo KurdishServiceConverter::formatTime('14:30');
// Output: چواردە و نیو

// Format percentage
echo KurdishServiceConverter::formatPercentage(0.75);
// Output: لە دەیا حەفتا و پێنج

// Convert to ordinal
echo KurdishServiceConverter::convertToOrdinal(3);
// Output: سێیەم
```

### Laravel Facade Usage

[](#laravel-facade-usage)

```
// If you want to use it as a facade
app('kurdish')->convertToWords(456);
```

🔧 Available Methods
-------------------

[](#-available-methods)

### Number Conversion

[](#number-conversion)

```
// Convert integers and floats to Kurdish words
KurdishServiceConverter::convertToWords(123);     // سەد و بیست و سێ
KurdishServiceConverter::convertToWords(123.45);  // سەد و بیست و سێ و چەند
```

### Digit Conversion

[](#digit-conversion)

```
// Convert English digits to Kurdish/Arabic numerals
KurdishServiceConverter::convertDigits('2024');   // ٢٠٢٤
KurdishServiceConverter::convertDigits(3.14);     // ٣.١٤
```

### Currency Formatting

[](#currency-formatting)

```
// Format monetary amounts
KurdishServiceConverter::formatCurrency(1000);           // هەزار دینار
KurdishServiceConverter::formatCurrency(500, 'USD');     // پێنج سەد دۆلار
```

### Time Conversion

[](#time-conversion)

```
// Convert time to Kurdish format
KurdishServiceConverter::formatTime('09:15');    // نۆ و چارەک
KurdishServiceConverter::formatTime('12:30');    // دوانزە و نیو
KurdishServiceConverter::formatTime('18:45');    // هەژدە و سێ چارەک
```

### Percentage Formatting

[](#percentage-formatting)

```
// Format percentages
KurdishServiceConverter::formatPercentage(0.25);   // لە دەیا بیست و پێنج
KurdishServiceConverter::formatPercentage(1.5);    // یەک پەڕسەنت و نیو
```

### Ordinal Numbers

[](#ordinal-numbers)

```
// Convert to ordinal format
KurdishServiceConverter::convertToOrdinal(1);    // یەکەم
KurdishServiceConverter::convertToOrdinal(2);    // دووەم
KurdishServiceConverter::convertToOrdinal(21);   // بیست و یەکیەم
```

⚙️ Configuration
----------------

[](#️-configuration)

The package includes configurable currency names. After publishing the config file, you can customize currency mappings in `config/kurdish-converter.php`:

```
return [
    'currency_names' => [
        'IQD' => 'دینار',
        'USD' => 'دۆلار',
        'EUR' => 'یۆرۆ',
        // Add more currencies as needed
    ],
];
```

🛡️ Error Handling
-----------------

[](#️-error-handling)

The package includes built-in safety measures:

- **Memory Protection**: Prevents memory exhaustion with large numbers
- **Input Validation**: Validates input types and ranges
- **Recursion Limits**: Prevents infinite recursion
- **Exception Handling**: Provides meaningful error messages

```
try {
    $result = KurdishServiceConverter::convertToWords(999999999999999);
} catch (\InvalidArgumentException $e) {
    echo "Error: " . $e->getMessage();
}
```

🧪 Testing
---------

[](#-testing)

The package includes comprehensive tests covering all functionality.

### Running Tests

[](#running-tests)

Run all tests:

```
composer test
```

Run tests with coverage:

```
composer test-coverage
```

Run specific test suites:

```
# Run only unit tests
./vendor/bin/pest tests/Unit

# Run only feature tests
./vendor/bin/pest tests/Feature
```

### Test Structure

[](#test-structure)

The package includes:

- **Feature Tests**: End-to-end testing of the main service
- **Unit Tests**: Individual testing of each helper class
- **Edge Case Testing**: Memory limits, recursion protection, error handling

🤝 Contributing
--------------

[](#-contributing)

We welcome contributions! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

### Development Setup

[](#development-setup)

1. Fork the repository
2. Clone your fork
3. Install dependencies: `composer install`
4. Run tests: `composer test`
5. Make your changes
6. Run tests again and ensure they pass
7. Submit a pull request

📝 License
---------

[](#-license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

👨‍💻 Author
----------

[](#‍-author)

**Muhammad Esmael**

- Email:
- GitHub: [@hamoi1](https://github.com/hamoi1)

---

 Made with ❤️ by [Muhammad Esmael](https://github.com/hamoi1)

 **Support Kurdish Language in Technology! 🌟**

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/63c07f90dd19de5f91c731c45252e83f5eb7227796e4c8d6efce3fa34c33a27c?d=identicon)[Hamoi1](/maintainers/Hamoi1)

---

Top Contributors

[![Hamoi1](https://avatars.githubusercontent.com/u/92602172?v=4)](https://github.com/Hamoi1 "Hamoi1 (1 commits)")

### Embed Badge

![Health badge](/badges/hamoi1-kurdish-converter/health.svg)

```
[![Health](https://phpackages.com/badges/hamoi1-kurdish-converter/health.svg)](https://phpackages.com/packages/hamoi1-kurdish-converter)
```

###  Alternatives

[solvire/php-json-schema-generator

A JSON Schema Generator written in PHP. The implementation is based on current internet drafts.

214.3k](/packages/solvire-php-json-schema-generator)

PHPackages © 2026

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