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.

This topic contains 3 replies, has 1 voice.

Last updated by radoslawL 1 day, 15 hours ago.

Assisted by: Andrey.

Author Posts
November 21, 2024 at 2:51 pm #16429728

radoslawL

Background of the issue:
I am managing a website with 4 languages: English (main), Spanish, Portuguese, and French. I added Dutch as a new language upon the client's request. I completed the translations, but WPML is not using the WooCommerce and theme translation packages for Dutch. Other languages display translations correctly. I verified that the Dutch translation packages for WooCommerce and the theme are present. I have temporarily added necessary translations using the string translation feature.

Symptoms:
WPML is not utilizing the WooCommerce and theme translation packages for the newly added Dutch language.

Questions:
Why is WPML not using the WooCommerce and theme translation packages for Dutch?
How can I ensure that WPML relies on the translations provided by WooCommerce and the theme developer for Dutch?

November 21, 2024 at 3:49 pm #16430103

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Hi,

before your ticket is assigned to one of my colleagues, please allow me to walk you through some initial debugging steps. This will help speed up the support process.

Please note an issue with WordPress 6.7 related to how translations are loaded. You can find more details here: https://wpml.org/errata/php-error-wp-6-7-notice-function-_load_textdomain_just_in_time-was-called/.

Best Regards,
Marcel

November 21, 2024 at 4:11 pm #16430151

radoslawL

Hello,
I have the most important plugins and the theme updated. Now the WP v6.7.1 update has come out - this has not changed anything.
Greetings - Radek

November 22, 2024 at 8:12 pm #16435217

Andrey
Supporter

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

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

Our development team is currently reviewing similar reports. Please try the following fix and let us know if it helps.

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.

Please backup your database before making any changes.

November 22, 2024 at 11:12 pm #16435438

radoslawL

Hey,
thank you very much for your help. The changes had the desired effect - woocommerce and theme translations are now visible in the frontend.