Home›Support›English Support›[Resolved] Theme translations set in WPML String Translation not loading since WordPress 6.7
[Resolved] Theme translations set in WPML String Translation not loading since WordPress 6.7
This thread is resolved. Here is a description of the problem and solution.
Problem: You are experiencing an issue where translations set in WPML > String Translation are not loading correctly after updating to WordPress 6.7. Instead of the translated strings, the original English strings from the theme are displayed. This problem does not occur when using WordPress version 6.6.2. Solution: We recommend following the instructions provided in the erratum published by our developers, which addresses the issue of MO files not loading in WordPress 6.7 and leading to missing translations on the front end. You can find the detailed steps here: https://wpml.org/errata/wordpress-6-7-mo-files-not-loaded-and-leading-to-missing-translations-on-front-end/. If the problem persists after following these steps, please provide us with temporary admin access (wp-admin and FTP) to your staging copy for further investigation. Ensure to back up your site and database before proceeding.
Please note that this solution might be outdated or not applicable 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 the issue still persists, please open a new support ticket at WPML support forum for further assistance.
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 trying to load translations from my theme that were set in WPML > String Translation. This issue started occurring after updating to WordPress 6.7.
Symptoms:
The translations are not loading correctly, and instead, I am seeing the original English strings from the theme. This issue does not occur if I downgrade WordPress to 6.6.2.
Questions:
This is a WPML bug that needs fixing, ASAP.
The screencast upload here is also not working, so here it is: hidden link
1. It seems that you're using a custom theme.
- Does that theme has its own translations? In that case can you check if the translations from the theme are working? If there not working then WML won't be able to overwrite them with the translations you made in "String Translation".
2. Did you contact the theme author? Do they have a new version fixing this issue? The core ticket I shared, presents some solutions.
3. I would recommend to downgrade to a previous version of WordPress to confirm that the issue is related to 6.7 https://wordpress.org/plugins/wp-downgrade/
1) It's a custom theme, developed by me, as many others I use with WPML.
- I'm using the built in WPML feature to read strings from the theme files (WPML > Themes and Plugins localization) and then translate them on WPML String Translation.
The translations are correctly loaded on WP below 6.7 but not on 6.7+.
- If I stop using this WPML feature and force loading the theme textdomain with a path, from my own generated PO/MO files (
) it works just fine even in WP 6.7+, which means the problem is isolated to WPML own functionality of having strings translated and loaded from the database.
- If I deactivate WPML and change the site language to any of the 2 additional languages I have PO/MO files for, it also loads the translations correctly, even on WP 6.7+.
- All this is true with our custom theme or any other theme.
2) I'm the theme author and I'm providing very detailed information for debug.
3) Please read my first message (that your AI system insisted on changing to his own words) and see the video. I already did downgrade to a previous version of WordPress, before 6.7, and it works just fine.
I don't know if the issue is related to WPML or not (but as I mentioned above, it seems like it is, and only when loading the translations from the database), I just replied that it's still not working after 6.7.1, because you mentioned "should be fixed in WordPress 6.7.1". I'm just reporting the issue still exists, so that you can work together and help the WordPress core fix it, if you insist it's not a WPML issue.
Yeah, it's working fine on your sandbox. I've checked all the settings on my install and the sandbox and can't find a difference.
Can I provide authentication details tou our staging install so you can check it out and see if you find any issue?
I got the WordPress Downgrade plugin installed, so you can downgrade to 6.6.x and it starts working again.
Example string, on the footer: "Questions and quotes? Contact us."
Could you please follow the instructions provided?
If the issue persist, provide me with a temporary admin access (wp-admin and FTP) to your staging copy – so I can further investigate. I will activate a private field for your next answer where you can provide that information safely (this field is only visible by you and the support team). Don't share your own admin account, create a new one that you will delete when we finish troubleshooting.
IMPORTANT: Before we proceed, please backup your site and database.
The workaround fixes it for me, although (as mentioned before) I'm not loading from MO files but from your String Translation database feature. It's probably the same mechanism anyway.
When are this changes going to be released in a public update?