This thread is resolved. Here is a description of the problem and solution.
Problem:
The client needs to identify all original posts and distinguish them from the translated ones when accessing the WordPress database directly via an API. They noticed that translated posts often contain the string "translatedWithWPMLTM" in the
post_content
, but found some exceptions.
Solution:
1. The string "translatedWithWPMLTM" indicates that the post has been translated using WPML's Translation Management. However, its absence does not necessarily mean that a post is not a translation.
2. The reason it might not appear in all translated posts could be due to different translation methods or changes in how WPML stores translation data over time.
3. To reliably identify translated posts, we recommend querying the WPML tables directly. Specifically, you can check the
icl_translations
table where each post (original or translated) has an associated entry. Look for the
source_language_code
field; if it's NULL, the post is an original; if it has a value, the post is a translation.
Please note that this solution might be irrelevant if it's outdated or not applicable to your case. If you're still facing issues, 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 the problem persists, 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.
This topic contains 1 replies, has 2 voices.
Last updated by 1 year, 4 months ago.
Assisted by: Prosenjit Barman.