Combining Yii2 Twig Templates And Gettext Internalization


Tell me how to combine Yii2 Twig templates with storing translations in Gettext?

I’m using the basic template (yiisoft/yii2-app-basic), and the corresponding extension for Twig (yiisoft/yii2-twig). After that, the templates are rendered through $this->render(‘about.twig’).

How to tie it with Gettext, through I can use {{‘some text’ | trans}} extension in my templates?