PHP code example of ismailelbery / arabic-name-translit

1. Go to this page and download the library: Download ismailelbery/arabic-name-translit library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ismailelbery / arabic-name-translit example snippets


Transliterator::name('أمير');   // "Amir"   (not "prince")
Transliterator::name('أميرة');  // "Amira"  (not "princess")

use Ismail\NameTranslit\Transliterator;

Transliterator::name('أمير');                         // "Amir"
Transliterator::name('أميرة');                        // "Amira"
Transliterator::name('فاطمة');                        // "Fatima"
Transliterator::name('محمد', style: 'gulf');          // "Mohammad"
Transliterator::name('محمد', style: 'egyptian');      // "Mohamed"
Transliterator::name('عبد الرحمن', standard: 'icao');  // "ABDULRAHMAN"

Transliterator::make()
    ->standard('common')   // common | icao | din31635 | ala_lc
    ->style('gulf')        // regional spelling convention
    ->name('أميرة');