E-mailed invoice language
wimh - November 3, 2009 - 20:30
| Project: | Ubercart |
| Version: | 6.x-2.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
uc_order_mail() looks at its $message argument to determine the language for the mail, which is calculated by uc_store_mail_recipient_language($recipient) in uc_order_mail_invoice_form_submit(). This language is correctly used to translate the e-mail subject.
The body of the e-mail, the invoice itself, is not translated correctly though, but is sent in the current language (i.e. the language the site was in at the time the mail is sent).
To fix this, uc_order_load_invoice(), when called from uc_order_mail(), should also get the $langcode and translate the invoice template accordingly.
