2amigos / yii2-transliterator-helper
Transliterator Helper for Yii2.
Installs: 216 914
Dependents: 24
Suggesters: 0
Security: 0
Stars: 26
Watchers: 23
Forks: 13
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2023-08-16 03:03:35 UTC
README
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');
Web development has never been so fun! www.2amigos.us