If for the Rule "Send an order notification e-mail to administrator (HTML)" the Send mail with Variable action is modified and set LANGUAGE parameter to an specific lang, E.x. "Español" then the [commerce-email-order-items] token doesn't care about that and generate in the user display language.

There is a dependent issue with variable_email module that doesn't pass the configured language when invoke the token generation.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

citlacom’s picture

Here is a first idea to resolve this problem, but only fix the commerce product title translation and the table headers and the total tokens still have a problem.

citlacom’s picture

Status: Active » Needs review
FileSize
4.05 KB

Here is a more complete patch that also translate the order line item table headers. It do a hack altering the global $language inside commerce_email_order_items() function and returning to the original value to make that t() function determine the translation of the strings inside the token with the configured lang. Is ugly but was the only way I found to resolve this without big refactor.

rszrama’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)