Description
Hello,
In Phalcon\Translate\Adapter\NativeArray we cannot access the whole internal translate array.
Sometimes it may help increase the performance when print the translation in view using the arrays instead of calling ( _ ) method on every word or sentence in the page especially in large pages.
For example: in beforeExecuteRoute event we can this
public function beforeExecuteRoute(Dispatcher $dispatcher)
{
// Set translate data
$this->view->setVar('_t', $this->translator->getAll());
}
and in the view we may use this:
{{ _t['title'] }}
instead of
this.translator._('title')
Thanks
Metadata
Metadata
Assignees
Type
Projects
Status
Released