I try to make translations in my Volt-templates, but I can't make it work.
In my config/services.php I have added the following in my view component to allow "gettext" function in the templates: $compiler = $volt->getCompiler(); $compiler->addFunction('', '');
Template example: {{ _('Username') }}
When I run xgettext, gettext statements from the PHP-files is OK, but it don't find the Volt-translations: xgettext -k_ -kgettext --from-code utf-8 -d kitcloud -o kitcloud.pot -L PHP --no-wrap $(find ../ ! -path '../cache/' ! -path '../sources/' -name ".php") $(find ./views -name ".volt")
First I tried the Gettext adapter from https://github.com/phalcon/incubator/tree/master/Library/Phalcon/Translate/Adapter. Same problem.
Any idea how to do this?