Home›Support›English Support›[Resolved] Template strings only translate when "Look for strings while pages are rendered" is enabled.
[Resolved] Template strings only translate when "Look for strings while pages are rendered" is enabled.
This thread is resolved. Here is a description of the problem and solution.
Problem:
You are using a template with strings that should be translated using WPML. The string translation functionality finds the strings, and you have provided translations. However, the English versions of the strings show on the frontend unless 'Look for strings while pages are rendered' is enabled.
Solution:
If you're experiencing this issue, we recommend you try the following steps:
1) Ensure you have upgraded to the latest version of WordPress and WPML. Specifically, for WPML, ensure you are using version 4.6.15 or later, which includes a fix for similar issues.
2) Increase the
MaxInputVars
of PHP settings to
10000
. For guidance on how to do this, please check this article.
3) Visit the WPML>>Support page, click on the Troubleshooting link, and on the Troubleshooting page, perform the following actions in the 'Clean up' section, waiting for confirmation of processing after each one:
- Clear the cache in WPML - Remove ghost entries from the translation tables - Fix element_type collation - Set language information - Fix WPML tables collation - Assign translation status to duplicated content - Fix terms count - Fix post type assignment - Cleanup and optimize string tables - Show custom MO Files Pre-generation dialog box>>Generate .Mo files
If the solution provided here becomes irrelevant due to updates or does not apply to your 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 issues persist, please open a new support ticket.
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.
Background of the issue:
I am using a template with strings that should be translated using WPML. The string translation functionality finds the strings, and I have provided translations.
Symptoms:
The English versions of the strings show on the frontend unless I enable 'Look for strings while pages are rendered'.
Questions:
Why do the translated strings only appear when 'Look for strings while pages are rendered' is enabled?
How can I ensure that translated strings appear on the frontend without enabling 'Look for strings while pages are rendered'?
Welcome to the WPML support forum. I will do my best to help you to resolve the issue.
This may be a compatibility issue. Please try the following troubleshooting steps after a full site backup{mandatory} and make sure the issue exists or not.
1) Upgrade to the latest version of WordPress (6.7.1)
2) Increase the *MaxInputVars* of PHP settings to *10000*. Please check the following article for more details or contact your system admin/hosting provider for this purpose.
hidden link
3) Go to WPML>>Support page, click on the Troubleshooting link (blue link in the middle of the page)
4) On the Troubleshooting page, please click on the following options in the *Clean up* section. Wait for confirmation of processing after each one.
- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Set language information
- Fix WPML tables collation
- Assign translation status to duplicated content
- Fix terms count
- Fix post type assignment
- Cleanup and optimize string tables
- Show custom MO Files Pre-generation dialog box>>Generate .Mo files
Thank you for the updates. One request. We have released a new version of WPML String Translation (3.2.16). It has included the fixes for similar issues. So please upgrade to the latest version after a full site backup and clear all types of caches. Then make sure the bug exists or not.
You may have to visit the Plugins>>Add New>> Commercial tab and click on the *Check for updates* button to get the WPML automatic upgrade links for the latest version. This step will help us refresh the installer caches.
Thank you for the updates. A couple of requests for tracking the bug.
1) Please let us know the exact steps to reproduce the issue on your site. It would be great if you could share a couple of screenshots or a screencast for a better understanding of the issue.
2) Please fill the private details fields after a full site backup. I would like to access the admin area of your site to check further. Refer to the following links for more details about our private information sharing policies.
Thank you for the updates. Feel free to use one of your temp mail id or bigul[dot]m[at]onthegosystems[dot]com.
Also, please let us know the exact steps to reproduce the issue on your site. It would be great if you could share a couple of screenshots or a screencast for a better understanding of the issue.
Thank you for the login information and details. This may be a compatibility issue with your theme.
Please upgrade to the latest version of WPML (4.6.15 series, which has included the fix for similar issues) after a full site backup. Then clear all types of caches and make sure the bug exists or not.
Thank you for the feedback. Please allow me to make a copy of your site using the Duplicator plugin (https://wordpress.org/plugins/duplicator/) on my local server to debug the issue. This way, we can troubleshoot the problem without affecting your live site.