mirkhamidov / yii2-transliterator-helper
Transliterator Helper for Yii2.
Installs: 23
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Type:yii2-extension
Requires
- 2amigos/yii2-transliterator-helper: *
- yiisoft/yii2: >=2.0.6
This package is auto-updated.
Last update: 2024-11-29 05:03:32 UTC
README
Extended from https://github.com/2amigos/yii2-transliterator-helper
TransliteratorHelper transliterates UTF-8 encoded text to US-ASCII.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require "mirkhamidov/yii2-transliterator-helper": "*"
or add
"mirkhamidov/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 mirkhamidov\transliterator\TransliteratorHelper;
// will echo AAAAAAAECEEEEIIIIDNOOOOOUUUUYssaaaaaaaeceeeeiiiidnooooouuuuyy
TransliteratorHelper::process('ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöùúûüýÿ', '', 'en'));