Select language for sending messages

I noticed that custom messages sent from the Commerce Dashboard (using the formatted template) are in English instead of German. Emails that get sent initially from a status like “Order received” are in German. I want all the messages to be German, and the only seemingly related system setting commerce.primary_lang is already set to de.

Is it because my manager is in english, that it sends emails in english, too? Is there a way to change that?

commerce.primary_lang is related to multilingual content support, not related to emails. Emails typically use the cultureKey context setting of the context the order was placed in.

If the order has the context, that context has the cultureKey set correctly, and it still doesn’t work, it is possible this is a bug where the manual sending does not properly switch languages that we’ll need to look into.

The cultureKey was set to de as well in the system settings. I only have the default web and mgr contexts. I also added the setting manually to both of those, but without success, so I guess this would need some looking into.

I just noticed that when regenerating invoices the same problem occurs. Invoices generated during the status change action are in German. But when I delete an invoice and let it regenerate (by clicking the invoice in the commerce dashboard) it uses the english lexicon placeholders.

Is there something else I could check to make sure it’s not a fault on my end?

Update on the invoice part:
If the customer causes the regeneration of a deleted invoice, it is in German. So it looks like only things (messages, invoices) generated from the manager Dashboard (which I use in english) are process in English.

I’ve added an issue to our tracker to investigate this. It ought to work in 1.3 but it sounds like it’s not correctly switching contexts anymore. Currently on my summer break but we’ll get back to this.

Hi @Vibe_Design

I just tested this with a context using a cultureKey of de and my manager set to English, and it’s sending the emails in German. I’m using LangRouter to switch contexts.

So unfortunately I’m unable to replicate it at the moment :thinking:

These are the context settings I used if they help at all:

Thanks for checking! Maybe I didn’t make this clear, but this is not a multi-context setup. It’s just the web context which has it’s cultureKey setting set to de (just like the general system setting is). It’s only that I use my manager in english by a user setting.

And it’s also only when re-sending messages from the dashboard. The initial messages when sending from the status update trigger work like expected.

Whoops sorry about that! :sweat_smile:

Just tested and got the same thing. :tada: I’ll get to work on a fix. Cheers!

1 Like

Should be fixed in 1.3.2, coming out in the next few days.

1 Like