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
- 8:00 – 13:00 9:00 – 13:00 9:00 – 13:00 8:00 – 12:00 8:00 – 12:00 -
- 14:00 – 17:00 14:00 – 18:00 14:00 – 18:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Europe/Zagreb (GMT+02:00)

Tagged: 

This topic contains 8 replies, has 0 voices.

Last updated by Bruno Kos 2 months, 3 weeks ago.

Assisted by: Bruno Kos.

Author Posts
January 29, 2026 at 5:39 am #17772201

yekdalK

Is there a way to stop automatic translation for specific pages?

I have created a script that generates pages using XLSX files. I am using 5 separate XLSX files for different languages. The default language of my WordPress site is English.

When I use the NL, DE, or FR language sheets, those pages are not auto-translated, which is expected. However, when I use the EN sheet, the pages are automatically translated into other languages. I want to prevent this auto-translation behavior for pages created from the English sheet.

Is there any hook or something

January 29, 2026 at 6:52 am #17772366

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

This has been escalated to our 2nd tier team team and may take some debugging time, I'll get back to you as soon as I have any news or questions for you.

February 3, 2026 at 4:24 am #17785439

yekdalK

Hi there

I used my script to create pages in languages other than the default language (EN). As confirmed by your support, these pages should not be translated automatically. However, they are still getting auto-translated.

Please check this urgently, as it is creating issues in my setup.

Also, can you provide a meta tag or any functionality that I can add in my script to prevent these pages from going through automatic translation?

February 3, 2026 at 7:09 am #17785626

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

I am still checking with our 2nd tier support about having a particular hook that allows discarding a TEA post in particular.

I will get back to you as soon as I have more information!

February 3, 2026 at 2:14 pm #17788277

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

WPML provides a filter that can be used to exclude posts from automatic translation:

wpml_exclude_post_from_auto_translate

This filter cannot be applied based on post meta. The reason is that WPML creates translation jobs immediately after a post is created. At that moment, the post metadata does not yet exist, so it cannot be evaluated by the filter.

As a workaround, automatic translation can be temporarily disabled for all posts during the import process and re-enabled once the import is completed.

Example:

add_filter( 'wpml_exclude_post_from_auto_translate', '__return_true' );

// Import posts here

remove_filter( 'wpml_exclude_post_from_auto_translate', '__return_true' );

The filter should be added at the beginning of the handle_ajax_import function and removed before the final statement of the function. The filters should not be placed inside any if-else blocks.

All customizations previously added for this behavior should be removed.

This is custom implementation work. We are not able to debug the client’s custom code, but we can provide working examples to demonstrate the correct approach. The example above has been tested and works as expected.

February 6, 2026 at 1:24 pm #17799862

yekdalK

Hi there

We have tested the provided solution. However, it was not successful. Pages imported were translated when we turned ON the auto translations mode.

Code link: hidden link

Can you please check into this and provide a solution.

February 9, 2026 at 6:10 am #17803736

yekdalK

Hi there

Just following up on the issue mentioned below.

We tested the solution you provided; however, it did not resolve the problem. We followed the exact steps you outlined, but unfortunately, it was not successful.

Could you please look into this matter? This is urgent for us.

Waiting for your kind reply.

February 9, 2026 at 7:12 am #17803854

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

I’ve forwarded your feedback to our developers for further review. I’ll get back to you as soon as possible to confirm whether a solution can be provided. Please note the following policy regarding custom code:
https://wpml.org/purchase/support-policy/#:~:text=general%20WordPress%20support.-,Custom%20code,-%3A%20While%20we%E2%80%99re%20happy

February 9, 2026 at 8:06 am #17803950

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Thank you for your patience while we reviewed this internally.

After further analysis, the correct approach is to prevent automatic translation during import when Translation Editor Advanced (TEA) is already running, without relying on post-meta–based filters that execute too late in the process.

To achieve this, the import logic should:

* Keep the existing code that prevents auto-translation during import when TEA is active
* Add a post meta during the import process, at the time the post is created:

  * Meta key: _wpml_post_translation_editor_native
  * Meta value: yes

Adding this meta at creation time forces the post to use the WordPress native editor. Posts using the WordPress editor are not translated using TEA, which ensures that no automatic translation jobs are created for imported content, even when TEA is enabled.

This approach avoids the timing issue where WPML creates translation jobs immediately after the post is created and before later metadata becomes available.

The topic ‘[Closed] Is there a way to stop automatic translation for specific pages? I have created a script that genera…’ is closed to new replies.