How to make example.com/en/contact and example.com/de/kontakt at the same time with one controller? - 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: How to make example.com/en/contact and example.com/de/kontakt at the same time with one controller? (/showthread.php?tid=44185) |
How to make example.com/en/contact and example.com/de/kontakt at the same time with one controller? - El Forum - 08-06-2011 [eluser]term25[/eluser] Hi, for language stuff I am currently using internationalization i18n library and language library. I can get www.example.com/en/contact www.example.com/de/contact However, I would like to know how to make these links: www.example.com/en/contact www.example.com/de/kontakt with just one controller called contact and two views called en_contact and de_contact. Is this possible? Thanks in advance. How to make example.com/en/contact and example.com/de/kontakt at the same time with one controller? - El Forum - 08-06-2011 [eluser]toopay[/eluser] For that case, you can do that by setting up one route rule... Code: $route['(en|de)/(contact|kontakt)'] = "contact/$1"; How to make example.com/en/contact and example.com/de/kontakt at the same time with one controller? - El Forum - 08-06-2011 [eluser]term25[/eluser] thanks a lot |