Skip Navigation

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

Problem:
The client was experiencing an issue where string translations were only working when the 'Look for strings while pages are rendered' option was active.

Solution:
We recommend following these steps to resolve the issue:
1. Navigate to WPML >> String Translation page.
2. Search for the problematic string, for example, 'Sfoglia il catalogo generale', and delete all occurrences.
3. Enable the 'Look for strings while pages are rendered' option.
4. Visit the front end of your site where the string appears.
5. Return to the WPML >> String Translation page, search for the string again, and add the translation.
6. Disable the 'Look for strings while pages are rendered' option.

Additionally, we performed these troubleshooting steps:
1. Used the troubleshooting options from WPML >> Support page.
2. Checked the issue in a minimal environment by deactivating all plugins except WPML.
3. Deactivated and reactivated the theme.
4. Scanned the theme from WPML >> Theme and plugins localization page.
5. Changed the string's text domain to the default 'wordpress' and then back to its original text domain.

These steps helped to resolve what appeared to be a temporary glitch.

Please note that this solution might be irrelevant if it's outdated or not applicable to your case. If the issue persists, we highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If needed, please open a new support ticket with us.

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 Noman 1 year, 2 months ago.

Assisted by: Noman.

Author Posts
March 11, 2024 at 12:20 pm

filippoT

I'm fighting with this problem:
https://wpml.org/it/forums/topic/string-translation-only-works-if-i-enable-look-for-strings-while-pages-are-rendered-option-is-active-2/

March 11, 2024 at 1:21 pm
March 11, 2024 at 6:59 pm #15396969

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I’ve tried various troubleshooting steps and I’m able to fix this issue by following the below procedure:

1. Went to WPML >> String Translation page.
2. Searched for the string e.g. “Sfoglia il catalogo generale”
3. Delete all occurrences of that string.
4. Enabled the “Look for strings while pages are rendered” option.
5. Visited the front of your site where that string is being shown:
hidden link
6. Went to WPML >> String Translation page searched for that string and added the translation.
7. Unchecked the “Look for strings while pages are rendered” option.

Could you please check and confirm?

Thank you

string frontend.png
March 12, 2024 at 7:51 am #15397937

filippoT

Hi Noman, now all the strings appear with correct translation, not only the one you tried.
Did you do something else with the settings?

March 12, 2024 at 7:52 am #15397938

filippoT

Hi Noman, now all the strings appears with correct translation, not only the one you tried.
Did you do something else with the settings?

March 12, 2024 at 8:10 am #15398000

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Here are the steps that I followed to debug this issue on your site:

1. Tried troubleshooting options from WPML >> Support page.

2. Checked the issue in the minimal environment by deactivating all plugins except WPML.

3. Deactivate/reactivate your theme.

4. Scanned the theme from WPML >> Theme and plugins localization page.

5. Tried to change the “Sfoglia il catalogo generale” string text domain to the default “wordpress” text domain and then it showed the correct translation.

6. Then, I reverted it to the same text domain and followed the steps those 7 steps and it solved the issue.

It seems this was a temporary glitch and performing troubleshooting steps and deactivating/reactivating the theme solved the issue.

Thank you