Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

WordPress 6.7 has introduced a new issue that impact translations, please update WooCommerce and WPML to the latest versions before you report issues. More about this here - https://wpml.org/errata/php-error-wp-6-7-notice-function-_load_textdomain_just_in_time-was-called/
Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Europe/Kyiv (GMT+02:00)

Tagged: 

This topic contains 4 replies, has 1 voice.

Last updated by Andrey 1 day, 22 hours ago.

Assisted by: Andrey.

Author Posts
November 21, 2024 at 4:05 pm #16430142

adrianM-2

Background of the issue:
I am trying to translate the WooCommerce system into two languages: German and English. I expected to see emails in German from the German URL or backend.

Symptoms:
Woocommerce emails are always in English with WooCommerce Multilingual enabled. With WooCommerce Multilingual disabled, emails are correct again.

Questions:
Why are WooCommerce emails always in English when WooCommerce Multilingual is enabled?
How can I ensure emails are sent in German from the German URL or backend?

November 21, 2024 at 4:06 pm #16430146

adrianM-2

Of course this worked with WordPress < 6.7

Okay, "WPML String Translation" seems to be the problem -> it is working, when I disable this plugin.

November 21, 2024 at 10:14 pm #16431247

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

I apologize for the trouble you encountered. We are aware of this issue and it will be addressed in the next release.

In the meantime, could you please try the following steps:

1. Go to WPML → Theme and Plugins Localization.
2. Deactivate the option "Automatically load the theme's .mo file using 'load_textdomain.'"

Let me know if this resolves the problem.

November 22, 2024 at 6:48 am #16431911

adrianM-2

Hello Andrey,

Thank you for your support.

Unfortunately, this option is already deactivated 😐

November 22, 2024 at 2:17 pm #16434197

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

I am sorry to hear this. Can you try the following fix after a full backup?

1. Open file /wp-content/plugins/wpml-string-translation/classes/MO/Hooks/LoadTextDomain.php

2. Add the line at the beginning of the file

use WPML\LIB\WP\WordPress;

just before

use WPML\ST\MO\File\Manager;

3. On line 38, change this

$this->reloadAlreadyLoadedMOFiles();

to this

		if ( WordPress::versionCompare( '>', '6.6.999' ) ) {
			add_action( 'init', function() {
				$this->reloadAlreadyLoadedMOFiles();
			}, 0 );
		} else {
			$this->reloadAlreadyLoadedMOFiles();
		}

4. Save it.