• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Controller Language Problem

#1
[eluser]webroasters[/eluser]
Hey Guys,

I'm not new to CI, but I'm new the forums. I have a quick question. CI is great when it comes to languages, but I was wondering if you guys had any suggestions on how to deal with controller names in other languages. For example, in Spanish, the word page is "Pagina". How would I switch that if I had a url like this: "http://www.example.com/pages/", and I wanted a url like: "http://www.example.com/paginas/"??

EDIT: When I mean switch, I mean on a language level, not on a physical controller name level.

Thanks guys.

#2
[eluser]SpooF[/eluser]
http://ellislab.com/codeigniter/user-gui...uting.html
Code:
$route['page/(:num)'] = "page/$1";
$route['pagina/(:num)'] = "page/$1";

Hope that solves your problem.

#3
[eluser]webroasters[/eluser]
Ah, I didn't think of dealing with the router file. Nice one. That's brillant. I should have thought of that. Thanks man.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.