1

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

enter image description here

Invoice (for the same order)

enter image description here


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.

1 Answer 1

0

You will need to add the strings in question to app/locale/{whateverlocale}/Mage_Sales.csv

You can locate the strings required in app/design/frontend/{company}/{theme}/template/email/order/items.phtml

3
  • They are already there and used for Order Confirmation email, but not for invoice and shipping mails ....
    – sv3n
    Commented Jun 22, 2017 at 15:01
  • Check inside app/design/frontend/{company}/{theme}/template/email/order/invoice/items.phtml and inside shipment/items.phtml that the strings haven't been taken outside of the translation helper. So it is $this->__('Subtotal') and not just Subtotal etc.
    – Eirik
    Commented Jun 22, 2017 at 16:09
  • Thanks, but we use base/default template there, so yes ... they are translatable.
    – sv3n
    Commented Jun 22, 2017 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.