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.

Sun Mon Tue Wed Thu Fri Sat
10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 - -
16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 - -

Supporter timezone: Asia/Jerusalem (GMT+02:00)

This topic contains 0 replies, has 0 voices.

Last updated by Itamar 1 month ago.

Assisted by: Itamar.

Author Posts
January 15, 2025 at 7:23 am #16595699

martinB-55

Good day,

After a lot of trial and error, I finally found and translated all the relevant strings for this one particular (!) email. Just the invoice email. The invoice email is now properly translated so that customers get this email in their desired language.

However, this is not a fix!

This is merely a workaround at best. 99 % of Germanized Pro is still in English with WP 6.7.1, while it was working properly out of the box with WP 6.6.2.

The underlying issue is still there with "Germanized Pro", this has not been fixed (!) and the fix cannot be to expect users to translate all the plugin's strings manually (there are thousands), when it works perfectly once reverting to WP 6.6.2.

Please investigate this further as it not only affects my setup but every user (!) who uses "Germanized Pro", as we've seen in the now expired sandbox.

And again, just for the record: "Germanized" is working properly by now, I'm talking about "Germanized Pro", a seperate plugin.

Thanks!

January 15, 2025 at 2:52 pm #16597829

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi, Martin.

I am sorry for any inconvenience you were caused.

I've brought to our second-tier supporters and my superiors' attention that you are unsatisfied with the suggested fix and asked them to help you further.

I'll keep you updated here on any news regarding this issue.

Thanks,
Itamar.

January 19, 2025 at 11:38 am #16610337

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi, Martin.

Our compatibility team has found the source of this problem and provided a fix.

1. Open the …/wp-content/plugins/woocommerce-germanized-pro/includes/class-wc-gzdp-wpml-helper.php file.

2. Look for line 112.

3. Replace:

	public function reload_locale() {
		unload_textdomain( 'woocommerce-germanized-pro' );

		WC_germanized_pro()->load_plugin_textdomain();
	}

4. With:

	public function reload_locale() {
		unload_textdomain( 'woocommerce-germanized-pro', true );

		WC_germanized_pro()->load_plugin_textdomain();
	}

5. Save the file.

**** Important! Please make a full site backup (files and DB) before you proceed with those steps****

Our compatibility team has also published an errata page about this case. You can see it here.

https://wpml.org/errata/germanized-for-woocommerce-pro-strings-are-not-translated-after-updating-wordpress-to-6-7-1/

Please note that the fix is in the Germanized for WooCommerce Pro's files, so we await the plugin's authors to include the permanent fix. We will update you here once we hear from them that the fix has been included.

Regards,
Itamar.

January 24, 2025 at 10:12 am #16630910

martinB-55

Good day,

Thank you for the feedback and the escalation again.

I'm afraid it already says

public function reload_locale() {
unload_textdomain( 'woocommerce-germanized-pro', true );

WC_germanized_pro()->load_plugin_textdomain();
}

in the file you mentioned. The issue persists.

January 24, 2025 at 10:30 am #16630939

martinB-55

To be more precise:

The mentioned fix works, BUT ONLY if there is no translation file at /wp-content/languages/wpml/

As soon as you edit at least one string for Germanized Pro, so that a .mo file is created at /wp-content/languages/wpml/, the fix falls apart and everything is English again for Germanized Pro.

January 27, 2025 at 7:56 am #16636025

martinB-55

Steps to reproduce the ongoing issue:

1. Make sure there is no "woocommerce-germanized-pro-de_DE.mo" at /wp-content/languages/wpml/ (and if there is, delete it).
2. Go to WPML String Translation and select the domain "woocommerce-germanized-pro".
3. Edit the German (!) translation of any string in the selected domain, for example for "TOS Generator".
4. This will create the file "woocommerce-germanized-pro-de_DE.mo" at /wp-content/languages/wpml/
5. Now the fix is falling apart and Germanized Pro is in English again, only the manually translated string from step 3 is in German.

I have reproduced this many times in my test environment and will test it in a sandbox at some point later this week as well, if I find the time.

January 28, 2025 at 10:37 am #16641020

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi, Martin.

I appreciate your persistence in showing us the Strings Translation problems with the Germanized for WooCommerce Pro plugin.

I've created a test site to check the steps you gave me. You can access it here.

hidden link

You wrote: "Now the fix is falling apart and Germanized Pro is in English again, only the manually translated string from step 3 is in German."

Before passing this issue on to our second-tier supporter, I want to be sure I present the entire problem to them.

1. Are the strings with the problem the following?

TOS Generator - Easily generate your custom terms & conditions through our API.
Cancellation Policy Generator - Easily generate your custom cancellation policy through our API.

Please see the attached screenshot.

2. Are there more places in the Germanized for WooCommerce Pro with this Strings Translation problem? Where can I see them?

3. The original issue of this ticket is with strings in emails about invoices. Does the problem also persist there? How can I see it?

Thanks,
Itamar.

2025-01-28_11-45-22.jpg
January 30, 2025 at 11:18 am #16650908

martinB-55

Good day,

Thanks for your ongoing help and sorry for the late reply.

I can see you already re-created the scenario that leads to the problem in the sandbox.

The two strings
"TOS Generator - Easily generate your custom terms & conditions through our API."
&
"Cancellation Policy Generator - Easily generate your custom cancellation policy through our API."
are symptoms of the problem, yes.

However, it's not just these two strings, all strings from the Germanized Pro domain are in English, it affects the whole plugin.

I just created a dummy order in the sandbox and if you open this dummy order and scroll down a bit, it says "Invoices" and there's a button "Create invoice". This is from Germanized Pro as well, which should be in German (and is again, if deleting the "woocommerce-germanized-pro-de_DE.mo" at /wp-content/languages/wpml/). You can try clicking on this button and then an invoice will be created, most probably in English as well.

This, again, is also just a symptom, the bug affects all Germanized Pro strings.

Once the file "woocommerce-germanized-pro-de_DE.mo" at /wp-content/languages/wpml/ exists, it's like it's overriding the plugin's own translation file and only the one at /wpml/ is considered.

Hope this helps.

P.S.:
"I appreciate your persistence in showing us the Strings Translation problems with the Germanized for WooCommerce Pro plugin." 😀
Thank you for still putting up with me 😉

January 30, 2025 at 11:58 am #16651168

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi,

While waiting for your reply, I escalated the issue to our second-tier supporter. I sent him the package of the sandbox site where I could (still) replicate the problem according to the steps you provided.

I'll keep you updated here on nay news regarding this issue.

Regards,
Itamar.

February 2, 2025 at 11:19 am #16659822

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi,

I have an update on this issue.

After intensive investigation, our second-tier supporter (who also consulted our developers) found the source of the problem and escalated it to our developers. Our second-tier supporter has provided a workaround for this problem.

1. Edit this file wp-content/plugins/woocommerce-germanized-pro/woocommerce-germanized-pro.php with a code editor:

2. In line 772, you will find this code:

                        load_textdomain( 'woocommerce-germanized-pro', trailingslashit( WP_LANG_DIR ) . 'woocommerce-germanized-pro/woocommerce-germanized-pro-' . $locale . '.mo' );
			load_plugin_textdomain( 'woocommerce-germanized-pro', false, plugin_basename( __DIR__ ) . '/i18n/languages/' );

3. You need to replace the lines, so load_plugin_textdomain will be called before load_textdomain. So this is the correct/fix code:

			load_plugin_textdomain( 'woocommerce-germanized-pro', false, plugin_basename( __DIR__ ) . '/i18n/languages/' );
			load_textdomain( 'woocommerce-germanized-pro', trailingslashit( WP_LANG_DIR ) . 'woocommerce-germanized-pro/woocommerce-germanized-pro-' . $locale . '.mo' );

4. Save the file.

**** Important! Please make a full site backup (files and DB) before you proceed with those steps****

Now, the Germanized for WooCommerce Pro strings should show in German as it was before the problem started.

Please let us know if this workaround works for you.

Thanks,
Itamar.

February 4, 2025 at 1:32 pm #16666904

martinB-55

Hello,

Thank you!

Which file is this referring to though?

February 4, 2025 at 1:56 pm #16667095

martinB-55

Hello,

I found it in /woocommerce-germanized-pro/woocommerce-germanized-pro.php

That does indeed do the trick!

Thank you very much.

So it was a Germanized issue after all (well, two issues actually) and Germanized tried to shift the blame.

Many thanks for your continued support and finding the solution. Please make sure that Germanized recognizes the issue and provides a permanent fix.

February 4, 2025 at 9:09 pm #16668500

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi, Martin.

I'm sorry for forgetting to add the file path. Yes, you got the correct file. I updated my reply. Thanks for confirming that it works!

This is an edge case that currently was reported only with the Germanized for WooCommerce Pro plugin. To my understanding, our developers will fix this problem on our side, meaning that if a plugin calls the load_textdomain before load_plugin_textdomain, WPML will know how to handle it.

The issue has been escalated to our developers, and when the fix is included in future versions of WPML, I'll update you here.

Best Regards,
Itamar.

February 6, 2025 at 9:17 am #16674173

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi, Martin.

For your information, we have also published an errata about this case.

https://wpml.org/errata/germanized-for-woocommerce-pro-strings-are-not-translated-after-updating-wordpress-to-6-7-1/

Regards,
Itamar.