PHP code example of ashtokalo / php-translit

1. Go to this page and download the library: Download ashtokalo/php-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/ */

    

ashtokalo / php-translit example snippets




echo \ashtokalo\translit\Translit::object()->convert('Беларусь', 'be') . ' vs ' .
    \ashtokalo\translit\Translit::object()->convert('Беларусь', 'be,latin');

$translit = new \ashtokalo\translit\Translit;
$translit->classes['tlh'] = \startrek\TranslitKlingon::class;
echo $translit->convert(' ', 'tlh');