All Projects → 2amigos → Yii2 Transliterator Helper

2amigos / Yii2 Transliterator Helper

Licence: bsd-3-clause
TransliteratorHelper transliterates UTF-8 encoded text to US-ASCII

TransliteratorHelper for Yii 2

Latest Stable Version Total Downloads Latest Unstable Version License

TransliteratorHelper transliterates UTF-8 encoded text to US-ASCII.

For a Yii 1.* version, please check this other repository.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require "2amigos/yii2-transliterator-helper:*"

or add

"2amigos/yii2-transliterator-helper": "*"

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\transliterator\TransliteratorHelper;

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

2amigOS!
Web development has never been so fun! www.2amigos.us

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].