DexyOnline DexyOnline - 5 months ago 20
PHP Question

Codeigniter's url_title() change UTF8 Characters to specified Latin

Is it possible to make

url_title()
produce rephrasing of this strings:

čolić
nešto


Into:

colic
nesto


I believe that this could be useful with Latin-base UTF8 languages and setting up more pretty and descriptive URLs for non-Latin languages.

Answer

Just tie into the convert_accented_characters function:

url_title(convert_accented_characters('čolić'));