reading this question (Polylang: How to translate custom strings?) I managed to create a custom string that is registered and translatable with Polylang, but when I add the pll_e() to my code snippet, the text is not placed correctly on frontend:
Using this code snippet, the "on backorder" text is translatable but is placed BEFORE the item name, instead of after the name:
$item_name .='<br /><div class="backorder">' .$backorder_qty. pll_e('on backorder').'</div>';
When I remove the pll_e(), the text displays correctly AFTER the item name, as it should:
$item_name .='<br /><div class="backorder">' .$backorder_qty." on backorder".'</div>';
Can you see what I do wrong when adding the pll_e() in the first line of code? Attached image shows how the text is misplaced. Thanks!