url - Multilanguage site in Codeigniter -


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 classes work in the codeigner, and I'm already using it.

My concern is that I need to show the URL in the chosen language. I will explain myself with an example:

When the English language has been selected, I have this URL: www.domain.com/cars/list_cars < / B> is a car controller and list_cars is the in-charge method of calling the appropriate view.

When the Spanish language language is selected, I will see the URL www.domain.com/coches/mostrar_coches

as shown in the form? What is the best way to achieve this? With something like routes.php :

Is there a better / easy way to gain it?

Thank you!

I had proposed to you using routes.php for your localized URL segment. Works fine for me, but for each page you need a new entry in your root file.


Comments