François Lefebvre François Lefebvre - 1 year ago 127
HTML Question

How to parse Timber (twig) templates with poedit and detect quoted strings to translate

I want to parse twig templates for Timber with poedit and I need to translate quoted contents. The problem is that I can't find a parser that does not skip quoted content.


<htmltag attribute="{{ __('value','textdomain') }}" />

Does someone know of a parser for poedit that detects quoted content, like html attribute content?

Answer Source

The workaround I found is to set a variable and use it as my attribute value.

{% set attr_value = __('value', 'textdomain') %}
<a href='{{ attr_string }}'>link</a>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download