PHP code example of bizincloud / magento2-transliterator

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

    

bizincloud / magento2-transliterator example snippets



use BizInCloud\Transliterator\Helper\Transliterator;

class SomeClass {

    private $transliterator;

    public function __construct(Transliterator $transliterator){
        $this->transliterator = $transliterator;
    }

    public function someMethod(){
        $string =  $this->transliterator->transliterate("Words containing diacritics: casă, șină, țară.");
        // $string will become: "Words containing diacritics: casa, sina, tara."
    }

    ...