Welcome Guest, Not a member yet? Register   Sign In
Dynamic routing, multilanguage uri
#1

[eluser]Unknown[/eluser]
Hi, im doing a multi site using a very interesting library Urilang with this routes.php:
Code:
$route['(\w{2})/book'] = 'book';
$route['(\w{2})/user'] = 'user';

$route['(\w{2})/(:any)'] = 'page/page/$2';

$route['(\w{2})/(.*)'] = '$2';

$route['default_controller'] = "page";
$route['404_override'] = '';

$route['(\w{2})'] = $route['default_controller'];

Now works in this way: for example if you want to go to user page, go here
Code:
http://example.com/en/user
. What I'm trying to do is to catch the uri regardless if the lang string is there, if the visitor goes directly to user in this way
Code:
http://example.com/user
use the default language or if the user has been previously selected a language, redirect to the proper uri with the correct lang string, how can i do this using routing? or, theres another way to do this?

Thanks
#2

[eluser]keevitaja[/eluser]
try this one:

https://github.com/keevitaja/mci




Theme © iAndrew 2016 - Forum software by © MyBB