Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 -
- - - - - - -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 8 replies, has 0 voices.

Last updated by Waqas Bin Hasan 5 days, 13 hours ago.

Assisted by: Waqas Bin Hasan.

Author Posts
September 11, 2025 at 1:39 pm #17394579

Jan

Background of the issue:
I would like to enable automatic translation for a specific custom post type: Product. Posts and pages contain manually created content, which should not be automatically translated. However, products are imported into our site via an API, and therefore should be translated automatically.

Symptoms:
Previous support articles contain outdated information or settings not available anymore.

Questions:
How can I enable automatic translation for a specific custom post type in WPML, and disable it for all other content?

September 11, 2025 at 2:28 pm #17394737

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Reference our recent chat I've moved to this ticket as requested.

Unfortunately there's no out of the box supported way of setting a specific post type for automatic translation. The prescribed method is as the following:

- Do not turn on "Translate Everything" mode.
- Select the content you want to translate automatically in WPML -> Translation Dashboard.
- And scroll down to end of the page and select translate automatically and send for translations (https://wpml.org/documentation/translating-your-contents/).

Regards.

September 12, 2025 at 6:55 am #17396144

Jan

I'm sorry to hear that. We are (very) experienced in PHP. Is there no filter or hook that WPML runs when an item is about to be sent for automatic translation? If that were possible, I could modify the selection there and make sure only posts of type 'product' were passed?

September 12, 2025 at 9:17 am #17396885

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Our current public APIs don’t expose a flag for AUTO_TRANSLATION jobs, however there's another workaround, please see https://wpml.org/forums/topic/i-need-to-be-able-to-start-automatic-translation-for-a-custom-post-type-only-and-only-in-certain-lan/#post-17114079 for a relevant discussion on the topic.

You can find the docs on WPML API at https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/.

September 15, 2025 at 6:50 am #17400775

Jan

Thank you for your technical response.

Possible solution 1 - XML

The possibility to disable automatic translation for a CPT using that XML is great, but I'm unsure if the xml '<custom-types>' attribute also support 'post' and 'page' as value, because we would have to disable those.

Would you know if that is the case?

---

Possible solution 2 - Custom cron action

Alternatively, I could imagine we would be able to build a function that runs periodically and does the following:
1. Retrieve untranslated recent products (wp_query)
2. Foreach product, trigger WPML to translate it automatically.

Could you help me with item 2. Is there a method we can call to trigger automatic translation for a certain post ID to certain/all languages? Even though 'translate everything automatically' is turned off?

September 15, 2025 at 10:44 am #17401629

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Unfortunately there's no such hook or method available in public API to trigger automatic translation for now.

However, after discussing with some colleagues, I'll file it as a feature request in our system. At this point we can't promise that if it is approved and if approved then how long it takes to roll out.

September 16, 2025 at 5:47 am #17404274

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation. I've registered this as a feature request in our systems and have escalated the matter to our 2nd tier team.

I'll update you if there's more to it, however, as noted earlier, it may take time if accepted.

September 16, 2025 at 4:48 pm #17407189

Jan

Thank you for your understanding. I understand it may take (significant) time. Would you please keep me updated on any progress, is that possible?

September 17, 2025 at 5:31 am #17408125

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Of course, I'll update you as soon as there's more to it.

Thank you for your patience and cooperation.