Language switching : Process variable and "redirect" to current_url() |
[eluser]bonatoc[/eluser]
OK, so I'm somewhat less a newbie than 2 hours before. After doing some RTFM_ing, I ended up with this, in config/routes.php Code: $route['(:any)/changelang/(:any)'] = '$1'; But since I struggle with Regex's, could someone tell me if this will work no matter where "/changelang/" is located in the URL ? What I mean is : Is this expression valid for ALL the following URLs ? http://mysite.com/admin/changelang/de-utf-8 http://mysite.com/products/detail/59/cha...g/de-utf-8 http://mysite.com/products/changelang/de...detail/59/ Also, is there a simple way to clean current_url() or SELF to avoid double declarations ? Like : http://mysite.com/admin/changelang/de-ut...g/de-utf-8 I guess I could pass the URI segments to my View and do some substr from SELF . Thanks ! |
Messages In This Thread |
Language switching : Process variable and "redirect" to current_url() - by El Forum - 07-27-2010, 07:41 AM
Language switching : Process variable and "redirect" to current_url() - by El Forum - 07-27-2010, 09:26 AM
|