Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Comments
Comment #1
citlacom CreditAttribution: citlacom commentedHere 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.
Comment #2
citlacom CreditAttribution: citlacom commentedHere 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.
Comment #3
rszrama CreditAttribution: rszrama at Centarro commented