PHP Class Neos\Neos\Service\TransliterationService

Show file Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Property Type Description
$localizationService Neos\Flow\I18n\Service
$transliterationRules boolean

Public Methods

Method Description
transliterate ( string $text, string $language = null ) : string Translaterates UTF-8 string to ASCII. (北京 to 'Bei Jing')

Method Details

transliterate() public method

Accepts language parameter that maps to a configurable array of special transliteration rules if present.
public transliterate ( string $text, string $language = null ) : string
$text string Text to transliterate
$language string Optional language for specific rules (falls back to current locale if not provided)
return string

Property Details

$localizationService protected property

protected Service,Neos\Flow\I18n $localizationService
return Neos\Flow\I18n\Service

$transliterationRules protected property

protected bool $transliterationRules
return boolean