Problems with routing |
[eluser]MV[/eluser]
Hi, I am trying to understand the routing on CI, but for how much i read (although i cant find that much to read), i am still having some problems in configuring my CI for the use i intend. I am trying to make my site react to URLs like these: www.site.com/pt/area_one/sub_area1/id1/id2/id3 www.site.com/pt/area_two/.... The first argument must represent the language of the site (pt, en and es): www.site.com/en/area_one/sub_area1/id1/id2/id3 etc... How should routes.php be configured to react to this? And how can i "capture" the result to build the links, i mean, links on the site should reflect the active language, for example: - If the url on the browser is something like www.site.com/en/cidade/house/3/21, the links in the html must have the "en" in them, but if the language is "pt", thats what should be on the links. Am i thinking correctly on how to deal with a multi language project in CI? (i dont want to use sessions, because it would break the bookmarking process - a user should be able to bookmark somewhere on the site and retain the active language) Please forgive the probably basic questions, but i cant find that much info on routing on the internet, and if you do have any links about it, would appreciate it also. I am also following the book "Professional CodeIgniter" from Wrox, but the section on routes is minimal. Thank you in advance. MV |
Welcome Guest, Not a member yet? Register Sign In |