Hello guys. I am new in phalcon and i am trying to make invo multilingual. I want my pages to redirect when they hit http://localhost/phalcon to http://localhost/phalcon/en and etc...
i used the routes in the app/config/routes.php $router = new Phalcon\Mvc\Router();


$router->add('/{language:[a-z]+}/:controller/:action', array(
    'controller' => 2,
    'action' => 3

$router->add('/{language:[a-z]+}/:controller/:action/:params', array(
    'controller' => 2,
    'action' => 3,
    'params' => 4

return $router;

After i used in app/config/routes.php $di->set('router', function(){ require DIR.'/routes.php'; return $router; });

What i am missing and i didin't understand? Thank you for your help!

You didn't actually state what your problem was, or what was happening.

Hello thanks for you reply. So i have the http://localhost/invo/index/index and its working when i am doing http://localhost/invo/en/index/index page not found and don't have access. I used dimopoulos function but when i put index too function in the router i take that website not found internal error. The problem is that i use the acl of invo and i take not authorized.