Hello guys. I am new in phalcon and i am trying to make invo multilingual. I want my pages to redirect when they hit https://localhost/phalcon to https://localhost/phalcon/en and etc...
i used the routes in the app/config/routes.php
$router = new Phalcon\Mvc\Router();
$router->removeExtraSlashes(true);
$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!