yii\helpers\BaseInflector::transliterate PHP Method

transliterate() public static method

If intl extension isn't available uses fallback that converts latin characters only and removes the rest. You may customize characters map via $transliteration property of the helper.
Since: 2.0.7 this method is public.
public static transliterate ( string $string, string | Transliterator $transliterator = null ) : string
$string string input string
$transliterator string | Transliterator either a [[\Transliterator]] or a string from which a [[\Transliterator]] can be built.
return string
    public static function transliterate($string, $transliterator = null)
    {
        if (static::hasIntl()) {
            if ($transliterator === null) {
                $transliterator = static::$transliterator;
            }
            return transliterator_transliterate($transliterator, $string);
        } else {
            return strtr($string, static::$transliteration);
        }
    }