Is there a standard way to handle diacritics in URLs for CI? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Is there a standard way to handle diacritics in URLs for CI? (/showthread.php?tid=28467) |
Is there a standard way to handle diacritics in URLs for CI? - El Forum - 03-12-2010 [eluser]Matthew Pennell[/eluser] Hello - I've not worked with CI for a couple of years so I may have missed a development in this area. Is there a standard way to handle creating url_title type strings from strings that contain diacritics? If I wanted to map Résumé to /about-me/resume/ - has anyone created a way to do it? Is there a standard way to handle diacritics in URLs for CI? - El Forum - 03-12-2010 [eluser]jáquer[/eluser] Maybe use something like this? Add this to an "unaccent" helper: Code: function unaccent($text) { And then: Code: $this->load->helper('url'); Code for the unaccent function found a hasty Google search, which lead me here. There might be better implementations of it. Is there a standard way to handle diacritics in URLs for CI? - El Forum - 03-13-2010 [eluser]Matthew Pennell[/eluser] Thanks, that looks like it might be useful. |