public TransliterationInterface::transliterate($string, $langcode = 'en', $unknown_character = '?', $max_length = NULL)
Transliterates text from Unicode to US-ASCII.
string $string: The string to transliterate.
string $langcode: (optional) The language code of the language the string is in. Defaults to 'en' if not provided. Warning: this can be unfiltered user input.
string $unknown_character: (optional) The character to substitute for characters in $string without transliterated equivalents. Defaults to '?'.
int $max_length: (optional) If provided, return at most this many characters, ensuring that the transliteration does not split in the middle of an input character's transliteration.
string $string with non-US-ASCII characters transliterated to US-ASCII characters, and unknown characters replaced with $unknown_character.
public function transliterate($string, $langcode = 'en', $unknown_character = '?', $max_length = NULL);
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Component!Transliteration!TransliterationInterface.php/function/TransliterationInterface::transliterate/8.1.x