Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 939
Dexy_Wolf Avatar asked Dec 10 '22 04:12

Dexy_Wolf


1 Answers

Just tie into the convert_accented_characters function:

url_title(convert_accented_characters('čolić'));
like image 86
Eric Avatar answered Feb 02 '23 00:02

Eric