What Transliteration Does
Transliteration is the process of swapping letters from one script to another. The substitutions are based on the characters that are displayed to make the words more readable (they are not phonetic–based on sounds). For example:
URLs only support ASCII characters (the letters A–z, numbers 0–9 and a few other special characters), so websites perform transliteration on URLs if they may contain non-ASCII characters.
They might need to do this if a site's URLs are based on article titles or member's names.
How to Transliterate
transliterator_transliterate() function, will replace the non-ASCII characters in
$string with the nearest corresponding ASCII character.
To use the function, you must have the Internationalization extension (also referred to as intl) installed on your web server. You can see how to check if it is installed below.
|Function||Convert to ASCII||String|
How to Check if the Internationalization Extension is Running
Temporarily add the
phpinfo() function to a page on your site.
View the page to see information about your version of PHP.
Look under the heading intl.
phpinfo() function from the page.
If it is running, then the first row will say enabled.
If it is not running, turn it on in
php.ini by removing the semicolon before the setting