Answer the question
In order to leave comments, you need to log in
How to fix encoding problem in VOLT template engine when using filters?
I'm doing a project on Phalcon. I'm trying to display plain text through the VOLT template engine. I write down the text (Cyrillic) in variables.
class IndexController extends \Phalcon\Mvc\Controller
{
public function indexAction()
{
$this->view->setVar('title', 'Товары');
$this->view->setVar('header', 'Список товаров');
}
}
<!DOCTYPE html>
<html>
<head lang="ru">
<meta charset="UTF-8">
<title>{{ title|lower }}</title>
</head>
<body>
<h1>{{ header|lower }}</h1>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
Yes, I suppose he uses the phehesh strtolower, and for Cyrillic you need mb_strtolower. Welcome to hell :D
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question