[ad_1]
Plugin Author
Tim W
(@timwhitlock)
Currently, no. The Blade extractor in Loco Translate is a bit of a workaround, and assumes the file is all non-PHP code.
It starts by adding its own <?php
tag to the beginning of the stream, and then uses the PHP tokenizer to parse out the function calls. It doesn’t try to switch between PHP and non-PHP as it works through the file. I guess it should, but it doesn’t. I don’t use Blade, so I wasn’t aware this was a problem.
Thank you for your prompt response. I understand what the problem is now, it can be easily bypassed by changing the code to the following
@php
$loco_works = __('Loco Works for this', 'vgstudio');
@endphp
<span class="share__text">
{{ __('and now Loco Works for this to', 'vgstudio') }}</span>