We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

How use html tags in translate array?

I use some construction

$this->_lang = [
'some' => 'text <b>text</b>'
];

$translator = new \Phalcon\Translate\Adapter\NativeArray([
    'content' => $this->_lang
]);

html tags in translate array $this->_lang not work.

How use html tags in array?



51.2k

It works. We can put any content. Maybe you escape html ? Where and how do you use the output ?



25.0k
$this->flash->success($this->_getTranslation('customerEdited', ['fio' => $customer->last_name.' '.$customer->name.' '.$customer->middle_name]));