Download the PHP package ismailelbery/arabic-name-translit without Composer
On this page you can find all versions of the php package ismailelbery/arabic-name-translit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ismailelbery/arabic-name-translit
More information about ismailelbery/arabic-name-translit
Files in ismailelbery/arabic-name-translit
Package arabic-name-translit
Short Description Name-aware transliteration of Arabic personal names into Latin script — transliterates, never translates.
License MIT
Informations about the package arabic-name-translit
Arabic Name Transliterator
Transliterate Arabic personal names into Latin script — the right way.
Why this exists
Generic engines translate names instead of transliterating them. Ask Google to render أمير and you get "prince"; أميرة becomes "princess" — because those words also mean prince and princess. Same trap with جميل ("beautiful"), نور ("light"), سعيد ("happy").
A name is a phonetic token, never a semantic one. This package treats it that way and never consults a translation source. Known names are mapped directly from a curated dictionary; unknown names fall back to a phonetic rule engine.
Installation
Requires PHP 8.1+. Laravel users get auto-discovery (service provider + facade) out of the box.
Usage
Quick
Fluent
Standards
| Standard | Output | Use case |
|---|---|---|
common |
Amir |
Human-readable; respects regional style. |
icao |
AMIR |
Doc 9303 / MRZ — passports, manifests. |
din31635 |
(v1.1) | Academic, diacritic-based. |
ala_lc |
(v1.1) | Library cataloguing standard. |
The icao standard is deterministic: uppercase output, AL article handling, no trailing taa-marbuta vowel, and compound names joined per Doc 9303. This is the path for compliance-driven systems (government records, Hajj/Umrah manifests, travel documents).
Styles (common standard only)
| Style | محمد |
أمير |
|---|---|---|
| default | Mohammed | Amir |
gulf |
Mohammad | Ameer |
egyptian |
Mohamed | Amir |
How it resolves
Each name is normalized (hamza/tashkeel/tatweel stripped), then resolved in order:
- Dictionary — exact lookup of known names. The primary path; this is what prevents the prince/princess bug.
- Compound — splits on particles (
عبد,أبو,ابن,بنت,آل) and the definite articleال, then re-resolves each part. - Rule engine — phonetic fallback for genuinely unknown names.
Handles taa marbuta endings (ة → a), initial hamza, long vowels (ي/و), and the definite article per the active standard.
Contributing
The dictionary is the heart of the package — the more curated names it holds, the better it performs. Additions to data/names.male.php and data/names.female.php (with regional alternates) are the most valuable contribution you can make. Keys must be stored normalized (no hamza on alif, no tashkeel).
Roadmap
- v1.0 — Common + ICAO standards, dictionary + rule engine, Laravel integration.
- v1.1 — DIN 31635 and ALA-LC standards, expanded regional styles.
- Experimental — reverse transliteration (Latin → Arabic). Stubbed, not yet implemented.
License
MIT
All versions of arabic-name-translit with dependencies
ext-mbstring Version *