PHPackages                             helturkey/php-arabic-support - 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. [Search &amp; Filtering](/categories/search)
4. /
5. helturkey/php-arabic-support

ActiveLibrary[Search &amp; Filtering](/categories/search)

helturkey/php-arabic-support
============================

Modern Arabic text support for PHP and Laravel: slugs, normalization, search keys, digits, cleaning, filenames, excerpts, and validation.

v0.1.0(1mo ago)05↓100%MITPHPPHP ^8.2CI passing

Since May 8Pushed 1mo agoCompare

[ Source](https://github.com/helturkey/php-arabic-support)[ Packagist](https://packagist.org/packages/helturkey/php-arabic-support)[ RSS](/packages/helturkey-php-arabic-support/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (7)Versions (2)Used By (0)

PHP Arabic Support
==================

[](#php-arabic-support)

**Modern Arabic text support for PHP and Laravel.**

PHP Arabic Support is a PHP-first package for Arabic-safe text operations: readable Unicode slugs, ASCII slugs, normalization policies, search keys, Arabic digits, text cleaning, safe filenames, excerpts, validation rules, Laravel macros, and Eloquent helper traits.

Why this package is useful
--------------------------

[](#why-this-package-is-useful)

Arabic text needs explicit handling. Generic string helpers often treat text as bytes or simple Unicode code points, while Arabic applications often need separate behavior for display, search, URLs, storage limits, and security.

A single visible Arabic character can be composed of a base letter plus one or more marks:

```
use ArabicSupport\Arabic;
use ArabicSupport\Enums\LengthUnit;

Arabic::length('مُ', LengthUnit::Grapheme); // 1 visible character
Arabic::length('مُ', LengthUnit::Unicode);  // 2 Unicode code points
Arabic::length('مُ', LengthUnit::Byte);     // UTF-8 byte length
```

Use `LengthUnit::Grapheme` for UI and display-safe limits, `LengthUnit::Unicode` for Unicode code-point limits, and `LengthUnit::Byte` for byte-limited protocols or storage.

The package also separates intent:

```
use ArabicSupport\Arabic;
use ArabicSupport\Enums\ArabicPolicy;

Arabic::normalize('قائِمةٌ تَجْرِيبيّة على مَنْصّةِ الإدارة', ArabicPolicy::Display);
// قائِمةٌ تَجْرِيبيّة على مَنْصّةِ الإدارة

Arabic::normalize('قائِمةٌ تَجْرِيبيّة على مَنْصّةِ الإدارة', ArabicPolicy::Search);
// قائمه تجريبيه علي منصه الاداره

Arabic::normalize('قائِمةٌ تَجْرِيبيّة على مَنْصّةِ الإدارة', ArabicPolicy::Slug);
// قائمة تجريبية على منصة الإدارة
```

`Search` is aggressive and should not be displayed to users. `Slug` keeps readable Arabic spelling while removing marks that are poor for URLs.

Requirements
------------

[](#requirements)

```
php >= 8.2
```

Recommended extensions:

```
ext-mbstring
ext-intl
```

The package includes fallbacks, but these extensions improve Unicode lowercase, normalization, transliteration, grapheme-aware length, and substring behavior.

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

[](#installation)

```
composer require helturkey/php-arabic-support
```

Quick examples
--------------

[](#quick-examples)

```
use ArabicSupport\Arabic;
use ArabicSupport\Enums\LengthUnit;
use ArabicSupport\Enums\SlugMode;

Arabic::unicodeSlug('دليل المستخدم العربي 2026');
// دليل-المستخدم-العربي-2026

Arabic::asciiSlug('دليل المستخدم العربي 2026');
// dlil-almstkhdm-alarby-2026

Arabic::slug('دليل المستخدم العربي 2026', SlugMode::Unicode);
// دليل-المستخدم-العربي-2026

Arabic::sanitize('أَحْمَدُ، مَدْرَسَةٌ؟ iPhone X');
// أَحْمَدُ، مَدْرَسَةٌ؟ iPhone X

Arabic::sanitizeForSearch('أَحْمَدُ، مَدْرَسَةٌ؟ iPhone X');
// احمد مدرسه iphone x

Arabic::safeFilename('تقرير: المبيعات/العام؟.pdf');
// تقرير-المبيعات-العام.pdf

Arabic::limit('مُحَمَّد علي', 5, LengthUnit::Grapheme, '...');
// مُحَ...
```

Laravel
-------

[](#laravel)

Laravel integration is optional. Plain PHP users do not install Laravel runtime dependencies.

```
use Illuminate\Support\Str;

Str::arabicSlug('دليل المستخدم');
Str::arabicSearchKey('إدارة المبيعات');
Str::stripArabicDiacritics('مُحَمَّد');
Str::arabicExcerpt('وصف منتج طويل', 100);
```

Documentation
-------------

[](#documentation)

English documentation:

- [Getting Started](docs/en/getting-started.md)
- [API Reference](docs/en/api-reference.md)
- [Normalization Policies](docs/en/normalization-policies.md)
- [Length Units](docs/en/length-units.md)
- [Laravel Integration](docs/en/laravel-integration.md)
- [Direct Classes](docs/en/direct-classes.md)
- [Security and Patterns](docs/en/security-and-patterns.md)
- [Profanity Filtering](docs/en/profanity-filtering.md)
- [Examples](docs/en/examples.md)

Arabic documentation:

- [البدء السريع](docs/ar/getting-started.md)
- [مرجع الواجهة](docs/ar/api-reference.md)
- [سياسات التطبيع](docs/ar/normalization-policies.md)
- [وحدات الطول](docs/ar/length-units.md)
- [تكامل Laravel](docs/ar/laravel-integration.md)
- [استخدام الأصناف مباشرة](docs/ar/direct-classes.md)
- [الأمان والأنماط](docs/ar/security-and-patterns.md)
- [فلترة الكلمات المحظورة](docs/ar/profanity-filtering.md)
- [أمثلة](docs/ar/examples.md)

License
-------

[](#license)

MIT

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance94

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

32d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a7658e6b20d82e76e6b4ae5da38a4dd759f2d3053993a5180617171c777f399?d=identicon)[helturkey](/maintainers/helturkey)

---

Top Contributors

[![helturkey](https://avatars.githubusercontent.com/u/13208801?v=4)](https://github.com/helturkey "helturkey (3 commits)")

---

Tags

arabic-laravelarabic-phplaravelphpphpslugsearchlaravelunicodetextarabicnormalization

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/helturkey-php-arabic-support/health.svg)

```
[![Health](https://phpackages.com/badges/helturkey-php-arabic-support/health.svg)](https://phpackages.com/packages/helturkey-php-arabic-support)
```

###  Alternatives

[mmanos/laravel-search

A search package for Laravel 5.

35175.7k1](/packages/mmanos-laravel-search)[rap2hpoutre/similar-text-finder

Fuzzy Search, similar text finder: "Did you mean `foo` ?"

13877.8k3](/packages/rap2hpoutre-similar-text-finder)[omaressaouaf/query-builder-criteria

Define reusable query criteria for filtering, sorting, search, field selection, and includes in Laravel Eloquent models

285.3k](/packages/omaressaouaf-query-builder-criteria)[remoblaser/search

A simple to implement Search for your Application

101.5k](/packages/remoblaser-search)

PHPackages © 2026

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