Download the PHP package omar-haris/arabic-name-transliterator without Composer
On this page you can find all versions of the php package omar-haris/arabic-name-transliterator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download omar-haris/arabic-name-transliterator
More information about omar-haris/arabic-name-transliterator
Files in omar-haris/arabic-name-transliterator
Package arabic-name-transliterator
Short Description A PHP library to transliterate Arabic names to English names can handle Arabic names with diacritics and special characters.
License MIT
Homepage https://github.com/omar-haris/arabic-name-transliterator
Informations about the package arabic-name-transliterator
Arabic Name Transliterator
A powerful PHP library for transliterating Arabic names to English with high accuracy. Perfect for ID systems, passports, and any application needing reliable Arabic-to-English name conversion.
Why This Library?
Transliterating Arabic names to English is challenging due to multiple correct spellings and regional variations. This library solves that problem with:
- Accurate transliteration that follows standard conventions
- Support for names with diacritics (harakat)
- Regional variations (currently Iraqi mapping, with extensibility for other regions)
- Smart word-level and character-level mapping
- Full customization options to meet your specific needs
Key Features
- Dictionary-based approach for common names and words
- Fallback letter-by-letter mapping for names not in the dictionary
- Customizable regional mappings for different Arabic dialects and standards
- Clean handling of diacritics (harakat) and special characters
- Well-documented code with comprehensive test coverage
- Zero external dependencies besides PHP's mbstring
Installation
Simply run:
Basic Usage
Advanced Usage
Creating Custom Mappings
You can create your own mappings by extending BaseMapping
:
Extending Existing Mappings
You can also extend an existing mapping:
How It Works
The transliteration process follows these steps:
- The input Arabic text is split into words
- Each word is checked against the full-word dictionary
- If found, the predefined transliteration is used
- If not found, the word is transliterated letter by letter
- The transliterated words are joined with spaces
- By default, each word is capitalized (can be disabled)
Available Mappings
Currently, the library includes:
IraqMapping
: Suitable for Iraqi Arabic names, following common standards for official documents
More regional mappings will be added in future releases. Contributions are welcome!
Requirements
- PHP 8.3+
- mbstring extension
License
MIT License. See the LICENSE file.
Credits
All versions of arabic-name-transliterator with dependencies
ext-mbstring Version *