Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x]: Email translations have wrong language #3852

Open
frederik-station opened this issue Jan 20, 2025 · 1 comment
Open

[5.x]: Email translations have wrong language #3852

frederik-station opened this issue Jan 20, 2025 · 1 comment

Comments

@frederik-station
Copy link

frederik-station commented Jan 20, 2025

What happened?

Description

Some context:

We have three sites:

  1. German: de-CH (primary site)
  2. French: fr-CH
  3. Italian: it-CH

We have two emails:

  1. Customer Order Notifcation - language setting: The language the order was made in.
  2. Admin Order Overview - language setting: Deutsch (Schweiz)

We're using the default queue runner over HTTP.

Quite often the translated strings in the Admin email are not in German but in the language of the order site.

We only have this issue when emails are sent out after an order has been completed. It always behaved correctly when I triggered an email from the order detail page in the backend.

On a side note, the order variable passed to the email template is always in the language of the order site. It used to be the primary site in Craft 4. Both is not great, from my perspective using the language setting of the email makes more sense. Also breaking changes like this should be documented in the upgrade guide.

Expected behavior

The translations of an email should always be in the language configured for this emails.

Actual behavior

The translations of the Admin email are sometimes in the language of the order site.

Craft CMS version

5.5.10

Craft Commerce version

5.2.11

PHP version

8.2

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant