*SOLVED* Multilingual codeigniter site |
[eluser]Mr. Pickle[/eluser]
Hi there, I want to set-up a multilingual Codeigniter project. I've tried to look up on this but could not find a satisfying solution. I simply want my first uri segment to be the language code, e.g. /en/ /de/ /fr/ etc.... Therefore I basically want the second segment to be the controller and the third segment to be the action. With the flexibility to put one or more segments behind. I now have set up something in the routes file, but I need to tell CI every possible route to every possible controller and action, while I'd like to keep this flexible. I'd unfortunately didn't work to just say: Code: $route[':any/:any/:any'] = "$2/$3"; So, how I'd like it is to have for example: http://siteurl/en/topic/show/1 To laoad the topic controller and the show action. There I catch the fourth parameter, and use it as the topic ID to show. But I need to have it work also if I have for example: http://siteurl/en/topic/show/1/print because I check in the code if a fifth parameter is present (and possibly a sixth, seventh... as well) Thanks in advance for any ideas/solutions! |
Messages In This Thread |
*SOLVED* Multilingual codeigniter site - by El Forum - 09-20-2010, 04:44 AM
*SOLVED* Multilingual codeigniter site - by El Forum - 09-20-2010, 07:03 AM
*SOLVED* Multilingual codeigniter site - by El Forum - 09-20-2010, 07:42 AM
*SOLVED* Multilingual codeigniter site - by El Forum - 09-20-2010, 07:45 AM
*SOLVED* Multilingual codeigniter site - by El Forum - 09-20-2010, 07:46 AM
*SOLVED* Multilingual codeigniter site - by El Forum - 09-20-2010, 07:48 AM
*SOLVED* Multilingual codeigniter site - by El Forum - 09-20-2010, 07:55 AM
*SOLVED* Multilingual codeigniter site - by El Forum - 09-20-2010, 07:57 AM
*SOLVED* Multilingual codeigniter site - by El Forum - 09-20-2010, 08:08 AM
*SOLVED* Multilingual codeigniter site - by El Forum - 09-20-2010, 08:20 AM
*SOLVED* Multilingual codeigniter site - by El Forum - 09-20-2010, 08:34 AM
*SOLVED* Multilingual codeigniter site - by El Forum - 09-20-2010, 08:48 AM
*SOLVED* Multilingual codeigniter site - by El Forum - 09-20-2010, 08:59 AM
|