I'm starting a new site project in Codeigniter. I need this site to be multilingual, where English will be the default language. I know how the language class in codeigniter works, and I am already using it.
My concern is that I need the URL to be shown in the selected language. I'll explain myself with an example:
When English language is selected, I have this URL: www.domain.com/cars/list_cars where cars is the controller and list_cars is the method in charge of calling the appropriate view.
When Spanish language language is selected, I would like the URL to show as www.domain.com/coches/mostrar_coches
Which is the best way to achieve this? The only way I can think of is by changing routes.php with something like:
$route['cars/list_cars'] = 'coches/mostrar_coches';
Is there any better/easier way of achieving this?
Thanks!