Skip Navigation

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

Problem:
The client reported that despite correct translations in the WPML string translation section, some sentences on certain pages of the Spanish version of their website were displaying in English. This issue was not present in an older staging version of the site.
Solution:
We identified that the issue was due to a conflict between language files from WPML and another language file. We recommended the following steps:
1. Ensure to back up your data.
2. Remove the language files or folders located outside of the

wp-content/languages/wpml

directory to avoid conflicts.
3. Do not drag these external language files into the WPML folder as it can overwrite existing translations.
4. If the issue persists, restore the

wp-content/languages/plugins

folder and remove the language files one by one to find the problematic file.
5. Uncheck the option "Cerca le stringhe durante il rendering delle pagine" to avoid rendering issues.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we highly recommend opening a new support ticket. Also, check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum 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 15 replies, has 2 voices.

Last updated by marcoG-31 4 months, 2 weeks ago.

Assisted by: Kor.

Author Posts
June 28, 2024 at 5:57 am #15849266

marcoG-31

Background of the issue:
same problem of the topic #15843177

Symptoms:
the translation is set in strings translations but it's only partially loading on the frontend, making the page mixed language

Questions:
My developer said "Hi Marco, I've been ckeching but haven't found the problem so far. I don't think it is in the code since the translations for all the other languages are working and the code is the same for all translations."

June 28, 2024 at 8:46 am #15850531

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thank you for contacting us.

I'm sorry to hear about the ongoing issues. Please let me know which string you are having trouble translating, along with the URL of the page and screenshots if possible.

To further investigate, I'll need temporary access to your test site (WP-Admin and FTP) where the issue has been replicated. This will allow me to provide more effective assistance and check if any configurations need adjustments.

For security reasons and to avoid any potential data loss, it's crucial to have a backup. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) for your backup needs.

Your response will be treated confidentially and will only be visible to you and me.

To resolve the issue, I may require your permission to deactivate and reactivate plugins and the theme, as well as make configuration adjustments on the site if necessary. Having a backup is essential in such cases.

June 28, 2024 at 1:10 pm #15852164

marcoG-31

Apologies, due to reaching the max inode usage for the full-immersion account I had to erase staging17. You should be able to login to the production site using the same credentials. The production site is backed up

June 28, 2024 at 2:50 pm #15852738

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thank you for your response.

I've identified the issue now. When I enabled the "Cerca le stringhe durante il rendering delle pagine" option, as demonstrated in this screen recording hidden link , the string appeared correctly.

This problem typically arises from a conflict between language files from WPML and another language file. Could you please attempt to remove the language files or folders located outside of the wp-content/languages/wpml directory? Deleting the conflicting language files should resolve the issue with displaying the correct strings.

Please ensure to back up your data before proceeding, and let me know the outcome.

June 28, 2024 at 3:07 pm #15852903

marcoG-31

All done, I created a file at the same level as wpml within the wp content > languages directory and I dragged all the files you mentioned in there. Now it's working fine.

Thank you, first of all!

Secondly, I wonder if this is something that could happen again... I don't recall putting any file there, are they automatically created by some caching plugin or are they created by some optimization plugin maybe?

I will delete them as soon as we're 100% sure that it's all working fine as it now seem

Thanks again

June 28, 2024 at 3:11 pm #15852910

marcoG-31

I disabled the "Cerca le stringhe durante il rendering delle pagine" and the problem persists... I had to turn it on again.

I can't leave that on as it uses too many resources apparently and has a timer...

Marco

June 28, 2024 at 3:15 pm #15852962

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thank you for responding.

Typically, these language files are generated during plugin installation or when using another translation plugin. However, you should avoid dragging these language files into the WPML folder because it can overwrite your existing translations. Please restore from a backup and refrain from moving the language files into the WPML folder. Just delete the language files.

June 28, 2024 at 3:19 pm #15852966

marcoG-31

OK, I have deleted the files

June 28, 2024 at 3:23 pm #15852983

marcoG-31

I confirm that without the "Cerca le stringhe durante il rendering delle pagine" option active, the page shows its content in the source language (only in the spanish version, all teh other versions are fine)

June 28, 2024 at 3:26 pm #15852991

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I hope you have a backup of the language files since we might need to restore it. Now, let's remove either one of the folders as shown in the attached screenshot. Remember to uncheck this option "Cerca le stringhe durante il rendering delle pagine"

Screenshot_337.png
June 28, 2024 at 3:31 pm #15853008

marcoG-31

Done, I deleted "Plugins", and deselected the option "Cerca le stringhe durante il rendering delle pagine". It now works fine on the frontend

June 28, 2024 at 3:33 pm #15853018

marcoG-31

Great, I think you found the issue 🙂 Thanks a million Kor! You saved my weekend and a dinner with my wife too!

June 28, 2024 at 3:33 pm #15853019

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Alright, it appears that there's a language file in the wp-content/languages/plugins folder causing this issue. To resolve this, you can restore the folder and gradually remove the language files one by one to pinpoint the problematic one.

June 28, 2024 at 3:39 pm #15853067

marcoG-31

I can't see your latest message here on the thread, only via email... I will reply here, the message says "Alright, it appears that there's a language file in the wp-content/languages/plugins folder causing this issue. To resolve this, you can restore the folder and gradually remove the language files one by one to pinpoint the problematic one.". The website is working fine without that folder, are you sure I need to restore and gradually test those 628 files one by one?

June 28, 2024 at 3:40 pm #15853069

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

If it's working fine, then, you can ignore it. have a nice weekend.