Order emails are correct, but my invoice and shipping emails are not fully translated.
Some fields are correct:
- billing/shipping address titles
- payment method title
But some get not translated:
- table headers for ordered items
- grand total / sub total
- payment info text ("Kontodaten" vs "Account info")
- a block from "MageSetup" extension
Differences
order email uses{{layout handle="sales_email_order_items" order=$order}}
invoice uses{{layout area="frontend" handle="sales_email_order_invoice_items" invoice=$invoice order=$order}}
I've already checked related files, but couldn't find the reason for missing translations. If I use sales_email_order_items
for both it works, but seems not to be correct.
Order
Invoice (for the same order)
Edit:
Missing translation only appears for programmatically created invoices/shipments.
The code I use is this ...
$invoice->getOrder()->setIsInProcess(true);
$transactionSave = Mage::getModel('core/resource_transaction')
->addObject($invoice)
->addObject($order)
->save();
$emailSentStatus = $invoice->getData('email_sent');
if (!$emailSentStatus) {
$invoice->sendEmail(true, $customerEmailComments);
$invoice->setEmailSent(true);
}
But still no idea what wrong here. If I create invoice/shipments from backend translation is OK.