This thread is resolved. Here is a description of the problem and solution.
Problem: The client is trying to translate strings using the WPML plugin, but some strings, particularly in the French language, are not displaying their translations. These strings are from the WPL PRO plugin used on the client's website.
Solution: We discovered a compatibility issue between the client's theme and WPML. Specifically, the problem lies within the
wpl_global::load_textdomain()
function of the Real Estate Listing plugin by Realtyna, which incorrectly unsets the MO file, leading to translations not being displayed. To resolve this, we recommend the following steps:
1. Ensure you make a backup of your website. 2. Edit the file
public static function load_textdomain($domain, $mofile)<br />{<br /> return load_textdomain($domain, $mofile);<br />}
After making these changes, check if the translations are now displaying correctly.
Please note that this solution might be outdated or not applicable to your case. If the issue persists, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, 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.
I'm trying to translate strings. I followed the instructions, and scanned for strings. Some strings are translated everywhere, but some of them are not, mostly for French language.
I use WPL PRO plugin, and strings that are not translated in every language are from that plugin.
To make it more clear, I can translate the strings but the translations are not showing.
Thank you for your quick reply.
String "Basic Details" is not translated only to French.(Images: 1,2,3) Other strings, and mostly custom ones are not translated to English, and French. (Images: 4,5,6)
I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated.
You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.
Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.
IMPORTANT
- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
After analyzing your issue locally, I wasn't able to get to a solution. So I escalated your ticket to our development team, which will look for a permanent solution. That usually takes a few days.
As soon as I have new information, I'll let you know. Have a lovely day, meanwhile 🙂
After deeply investigating your issue, we found out that there was a compatibility issue with your theme and WPML. The issue is that translations are only working with the Block theme and not with older themes like Twenty Twenty or Avada, due to a problem in the wpl_global::load_textdomain() function in the Real Estate Listing plugin by Realtyna. This function incorrectly unsets the MO file, preventing translations from being displayed. A proposed workaround is to modify the load_textdomain method in the plugin's global.php file to use WordPress's native load_textdomain() function instead of unsetting the MO file.
Please make a backup of your website and follow these steps:
1. Edit file \wp-content\plugins\real-estate-listing-realtyna-wpl-pro\global.php line 2011
2. Replace:
public static function load_textdomain($domain, $mofile)
{
with:
public static function load_textdomain($domain, $mofile)
{
return load_textdomain($domain, $mofile);