Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Arabic Toolkit

No security coverage Under active development

The Arabic Toolkit module provides essential services for processing Arabic text within Drupal. It offers solutions for common issues like inconsistent character forms, text directionality, and invisible characters, ensuring better search functionality and content quality. The module includes text normalization, direction detection, analysis, auditing, and number formatting, along with Twig filters and Drush commands for easier integration.

Arabic Toolkit is a Drupal 10/11 foundation module that provides reusable services for Arabic language processing. Other modules, themes, and site builders can inject these services instead of reimplementing Arabic text handling.

It solves common problems on Arabic-language sites: Alef variants that break search, Tatweel and diacritics that fragment indexes, mixed RTL/LTR text, and quality issues such as invisible Unicode characters or Latin punctuation in Arabic content.

Features

  • Arabic text normalization — configurable rules for Alef variants, Tatweel (Kashida), diacritics, invisible Unicode characters, and whitespace.
  • Text direction detection — RTL, LTR, mixed, or unknown.
  • Text analysis — detects Arabic script, Latin script, Tatweel, diacritics, and mixed direction.
  • Text auditing — typed findings for unnormalized characters, invisible characters, incorrect punctuation, multiple spaces, and mixed direction.
  • Number formatting — converts between Latin digits (0–9) and Arabic-Indic digits (٠–٩).
  • Twig filters — arabic_digits, latin_digits, arabic_normalize, text_direction.
  • Drush commands — arabic:normalize, arabic:analyze, arabic:audit, arabic:info.
  • Optional Search API integration — the arabic_search submodule provides an Arabic Text Normalization processor. Search API is not required to use the main module.

Post-Installation

  1. Enable the module: drush en arabic_toolkit -y
  2. Inject services such as arabic_toolkit.normalizer in custom code, or use the Twig filters in templates.
  3. Optional: enable Search API integration with drush en arabic_search -y, then add the Arabic Text Normalization processor on your Search API index and reindex.

Default normalization is conservative: Alef, Tatweel, diacritics, and whitespace are normalized. Yeh and Teh Marbuta are off by default because they can change word meaning.

Additional Requirements

  • PHP 8.3+
  • Drupal 10.3 or 11
  • Search API — only if you enable the arabic_search submodule
  • Drush — only if you want the CLI commands
  • Search API — use the bundled arabic_search processor to normalize Arabic content before indexing.

Similar projects

  • Ar-PHP — wraps the Ar-PHP library (tags, calendars, filename transliteration). Arabic Toolkit is a modern Drupal service API with no external library and optional Search API support.
  • Hijri Dates — Hijri calendar display. Out of scope for Arabic Toolkit.
  • CKEditor BiDi Buttons — editor toolbar for RTL/LTR. Complements this module; does not normalize or audit text.

Supporting this Module

File issues and merge requests on the project page. Contributions that follow Drupal Coding Standards are welcome.

Community Documentation

See the project README after the first release is tagged. Installation, services, Twig filters, Search API setup, and Drush commands are documented there.

Ask your assistant about Arabic Toolkit

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Sep 2026
Latest release
1 month ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Core PHP Release date
1.0.0-alpha2 Pre-release 10–11 PHP ^8.3 Sep 5, 2026
1.0.0-alpha1 Pre-release 10–11 PHP ^8.3 Sep 5, 2026