If you are dealing with content data have non Ascii character like Bulgarian, Russian, German etc. and want to have all characters transliterated in slugs and file names you can use this package.
composer require aginev/wp-sanitize
wp_sanitize_title();
// Имало едно време в Мексико -> imalo-edno-vreme-v-meksiko
wp_sanitize_filenames();
// Имало едно време в Мексико.jpg -> imalo-edno-vreme-v-meksiko.jpg
Everything in this repository is MIT License unless otherwise specified.
MIT © 2018 Atanas Ginev