Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
If you're experiencing issues where translations fail when the auto register strings function is turned off on your WPML setup, here's a step-by-step guide to help you resolve this.
Solution:
1. Rename the

languages

folder: In your FTP client, rename the

wp-content/languages

folder to something like

languages-backup

. This action will temporarily remove the compiled

.mo

files while keeping them safe if needed later.
2. Regenerate

.mo

files: In your WordPress dashboard, go to WPML > Support > Troubleshooting, and choose Show custom MO Files Pre-generation dialog box.
3. Test in minimal setup: Since staging works well, it could be that a security or caching plugin on the live site is causing the issue. Temporarily disable any security and caching plugins (like Wordfence, Sucuri, WP Rocket, etc.) and check if WPML functions correctly.
4. Verify translations: Once you’ve completed the steps, review the site to ensure translations display properly.
After testing, you can delete the

languages-backup

folder if everything functions as expected, as WPML will have recreated any necessary files.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your specific case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.

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.

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by Bruno Kos 1 year, 5 months ago.

Assisted by: Bruno Kos.

Author Posts
October 30, 2024 at 1:18 pm #16347313

Dennis

Background of the issue:
I am trying to use the auto register strings function in WPML for my site hidden link. My main language is Danish, and English is the secondary language. I have cloned the site to a new staging environment to fix the issue.
hidden link

Symptoms:
When the auto register strings function is activated, all translations appear correct. However, when the function is turned off, all translations fail.

Questions:
Why do translations fail when the auto register strings function is turned off?
How can I fix the translation issue on my staging site?

October 31, 2024 at 7:21 am #16349842

Bruno Kos
WPML Supporter since 12/2018

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

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

Hi,

Thank you for contacting WPML support!

This function should be turned off and only used for finding strings on a particular location.

If translations show up only when this is active it indicates a bug somewhere else.

Can you try the following:
- WPML - > Support -> Troubleshooting:
– Show custom MO Files Pre-generation dialog box

Make sure that the option of auto registering strings is deactivated.

If it still doesn't work after regenerating MO files, can you please check if this issue appears when only WPML and WooCommerce plugins are activated, as it will tell us if there is an interaction issue with other plugin

Regards,
Bruno Kos

October 31, 2024 at 7:41 am #16349883

Dennis

Hello Bruno. This was very helpful but strangely the fix worked fine on the staging environment hidden link but not on the live site hidden link 🙁

Perhaps some old databases are in play. This site used to be in english language (main) and danish for secondary.

Perhaps there is something here? But strangely the new site was recently done as a fresh installation at newsite.hanieljewelry.com and then moved to the main domain.

October 31, 2024 at 8:03 am #16349930

Bruno Kos
WPML Supporter since 12/2018

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

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

I see - Would you be willing to provide me with WordPress credentials so I could investigate the issue directly?

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

I marked your next reply as private so that you can safely add credentials.

Also, can you:

- install https://wordpress.org/plugins/pexlechris-adminer/
- send me the URL where I can see one of the strings where translation does not work

October 31, 2024 at 10:16 am #16350774

Bruno Kos
WPML Supporter since 12/2018

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

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

Can you try this?

1. **Rename the `languages` folder**: In your FTP client, rename the `wp-content/languages` folder to something like `languages-backup`. This action will temporarily remove the compiled `.mo` files while keeping them safe if needed later.

2. **Regenerate `.mo` files**: In your WordPress dashboard, go to **WPML > Support > Troubleshooting**, and choose **Show custom MO Files Pre-generation dialog box**.

3. **Test in minimal setup**: Since staging works well, it could be that a security or caching plugin on the live site is causing the issue. Temporarily disable any security and caching plugins (like Wordfence, Sucuri, WP Rocket, etc.) and check if WPML functions correctly.

4. **Verify translations**: Once you’ve completed the steps, review the site to ensure translations display properly.

After testing, you can delete the `languages-backup` folder if everything functions as expected, as WPML will have recreated any necessary files.

Let me know how it goes!

October 31, 2024 at 11:18 am #16351072

Dennis

Hello Bruno

This did the trick- thank you so much. This was really a big issue for me.

🙂