Open vincent-peugnet opened 9 months ago
Someone have created a composer package with it:
https://github.com/rap2hpoutre/convert-accent-characters
Usefull if I want to have more dependecies ;)
https://packagist.org/packages/rap2hpoutre/convert-accent-characters (15 000 installs)
OR event the biggg solution:
Or event bigger: The slugyfier
AND at least another option: Using PHP transliterator
https://www.php.net/manual/en/transliterator.transliterate.php#111939
Currently W's accent remove for ID is very homemade. I just did some basic french-used-accent replacement.
I could use a better function, for exemple the one used by Wordpress :
https://github.com/WordPress/wordpress-develop/blob/87dfd5514b52aef456b7232b1959873e69e651da/src/wp-includes/formatting.php#L1607-L2013
https://developer.wordpress.org/reference/functions/remove_accents/