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

Implement additional identifier/control structure for translations

I am currently working on translating the site into multiple languages. So far i implemented a custom function and modifier that works like this:

html <h1>{{ trans('Shopping') }}</h1> html <h1>{{ 'Shopping'|trans }}</h1>

But, wrapping all phrases into strings it's hard to read and maintain. Is there any possibility that i could do something like this: ? html <p>{% trans%}Shopping{% endtrans %} </p>

I though that i could implement a custom compileTrans as extension but didn't helped.

Thanks.



51.2k

Hi Marian,

You are using Twig or Volt ?

Hey Calin,

I am using Volt .



51.2k

Uf :) Can't help