Skip to content Skip to sidebar

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 Prosenjit Barman 1 year, 4 months ago.

Assisted by: Prosenjit Barman.

Author Posts
February 28, 2024 at 6:22 am #15351871

ronA-8

I am accessing wp database directly via api.
I want to identify all original posts - else the translated ones.
I found out that the translated posts have the string "translatedWithWPMLTM" in the post_content.
However, I found some exceptions, without it.
1. What does translatedWithWPMLTM mean?
2. Why it is not in all translated posts?
3. Is there a better way to identify translated posts?

February 28, 2024 at 7:19 am #15351960

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,

As the chat was inactive for a long time, I had to convert the chat to a ticket. This approach allows us to better track and resolve your query efficiently.

Please feel free to share any updates or ask further questions in response to the ticket. I'm here to help and would be glad to offer additional assistance.

Best regards,
Prosenjit