I'm using Phalcon and his capability to make easier the translation with his Class Translate. So far I'm passing the t variable from the index to all the views, right when I set up volt, like this :
$view = new View();
$view->setViewsDir(WEBSITE_PATH.'/views/');
// Return a translation object
$view->t = new Phalcon\Translate\Adapter\NativeArray([
"content" => $localization
]);
That is working, but I also have pages to translate outside from the folder views, in .php, not .volt. How can I share/set/pass this variable 't' to other places?