sbs/transliterator-helper

Transliterator Helper for Yii 1.*.

dev-master 2017-01-01 12:58 UTC

This package is auto-updated.

Last update: 2024-11-16 04:12:37 UTC


README

Transliterator Helper transliterates UTF-8 encoded text to US-ASCII

Adapted for PHP 5.3 by koftikes.

Installation

The preferred way to install this extension is through composer.

Either run

composer require sbs/transliterator-helper

or add

"sbs/transliterator-helper": "^1.0"

to the require section of your application's composer.json file.

Usage

Pass to the method process() the UTF-8 encoded string you wish to transliterate:

use dosamigos\yii\helpers\TransliteratorHelper;

// will echo AAAAAAAECEEEEIIIIDNOOOOOUUUUYssaaaaaaaeceeeeiiiidnooooouuuuyy
TransliteratorHelper::process('ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöùúûüýÿ', '', 'en'));