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.

Elementor users - please update WPML to the latest version to maintain compatibility. More details here - https://wpml.org/changelog/2024/12/wpml-4-6-15-critical-update-for-elementor-sites/

This topic contains 4 replies, has 1 voice.

Last updated by orO 19 hours, 16 minutes ago.

Author Posts
December 23, 2024 at 7:02 pm #16541419

orO

Background of the issue:
I have created a translation for 'HTML 5' custom string that you can use in the Flatsome builder. At first, it worked fine, and I saw the translation on the translated website and the original text in the original Hebrew language. Link to a page where the issue can be seen: hidden link

Symptoms:
The translated English text appears in both the original Hebrew version of the website as well as in the translated version. The original text was replaced with the translation, overriding it, and it is now lost.

Questions:
Why is the translated text appearing in both the original and translated versions?
How can I restore the original text that was replaced by the translation?

December 23, 2024 at 7:57 pm #16541898

orO

After I rewrote the original text and saved it all worked for a while, but then again, for the second time, suddenly the original text was overridden by the translation at its source, leaving both languages with the translated text.

So this is not a one time thing, this is constant.

December 24, 2024 at 8:05 am #16542841

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

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

Hi,

Thank you for contacting WPML support!

It seems the issue you’re experiencing might be related to a known problem where translations of admin strings replace the original text after visiting the WordPress Customizer. You can find more details here: https://wpml.org/errata/admin-strings-replaced-by-translations-after-visiting-the-customizer/

As a workaround, please follow these steps:

1. **Backup Your Site**
Ensure you have a full site backup before proceeding to avoid any unintended changes.

2. **Edit the `wpml-admin-texts.class.php` File**
- Open the file located at `…/wp-content/plugins/wpml-string-translation/inc/admin-texts/wpml-admin-texts.class.php`.
- Locate line 214.

3. **Replace the Code**
Replace this line:

 $isAdmin = is_admin() && ! wpml_is_ajax();  

With this:

   $isAdmin = is_admin() && ! wpml_is_ajax() || ( isset($_REQUEST["wp_customize"]) && $_REQUEST["wp_customize"] == "on" ) || ( isset($_POST["screen_id"]) && $_POST["screen_id"] == "customize");  

If you encounter any issues or need further guidance while applying this workaround, please let us know, and we’ll assist you further.

Best regards,

December 24, 2024 at 1:20 pm #16543868

orO

Hello,
But this fix will be overridden as soon as a new version is released for your plugin. This is not a viable way to implement such a fix.

December 24, 2024 at 1:40 pm #16543902

orO

Anyway, I did exactly what you said, but it did not solve the issue. It is the same.