Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing issues with ACF Field Groups being translated by WPML despite setting them as not translatable. They have used the constant

define('ACFML_EXCLUDE_FIELD_GROUP_STRINGS_IN_POST_JOBS', true);

to prevent translation, but the WPML backend still shows messages indicating that ACF Field Groups might be translated, causing confusion.

Solution:
We advised the client to ensure that the ACF Field Groups are set to 'Not translatable' in WPML's settings. If they have already created translation jobs before adding the constant to the wp-config.php file, they should cancel these jobs and create new ones. This can be done under WPML > Translation Management > Jobs. Additionally, if the strings were already translated in the WPML Translation Editor, they might still appear due to being saved in the editor's translation memory. For further guidance on setting translation preferences for ACF fields, we recommended checking the documentation at https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/recommended-custom-fields-translation-preferences-for-acf-and-wpml/.

If this solution does not resolve the issue or seems irrelevant due to being outdated or not applicable to your 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 problems persist, please open a new support ticket at WPML support forum.

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.

Tagged: 

This topic contains 10 replies, has 1 voice.

Last updated by Andreas W. 1 week, 2 days ago.

Assisted by: Andreas W..

Author Posts
April 10, 2025 at 7:15 am #16916812

Ton

Background of the issue:
I am trying to ensure that ACF Field Groups are never translated on my site hidden link (and all other sites we host). I have set up define('ACFML_EXCLUDE_FIELD_GROUP_STRINGS_IN_POST_JOBS', true); to prevent translation. We use the following code in our website: include(locate_template('components/' . get_row_layout() . '/' . get_row_layout() . '.php')); and if this gets translated, it will not include the correct PHP file.

Symptoms:
In the new version of WPML, it still says that starting with version 4.7, WPML will automatically translate texts (strings) coming from ACF Field Group, Gravity Form. WPML will not translate existing texts of this type, but any new texts you create will be translated automatically.

Questions:
How can I ensure that ACF Field Groups are never translated in WPML?

April 10, 2025 at 12:19 pm #16918468

Bruno Kos
WPML Supporter since 12/2018

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

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

Hi,

Do you mean Field Groups? Because if you don't want to translate them, you need to set acf-field-group as Not translatable.

Because this https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/acf-multilingual-acfml-constants-and-hooks-reference/#acf-multilingual-acfml-constants constant does something different (in fact it prevents it).

field groups.png
April 10, 2025 at 1:02 pm #16918763

Ton

Hello Bruno,

Yeas I am talking about the ACF Field Groups.

Yeah I have that setting set to not translatable and it is indeed disabled.
But than why does the back-end show that message? It even shows the ACF Field Group in the translation dashboard.

It makes it confusing and unsure if setting the the constant works correctly.
I would expect never to see any message about ACF Field Group translations if I set the constant in the wp-config.

Hope to hear from you.

Kind regards

April 11, 2025 at 4:53 pm #16923885

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Inside Translation Management, we only offer the possibility to translate the Labels for each Group.

As you said already, you can prevent this by using:

define( 'ACFML_EXCLUDE_FIELD_GROUP_STRINGS_IN_POST_JOBS', false );

IMPORTANT:

If you created a translation job before adding this code to your wp-config.php file, cancel it and create a new one.

Go to WPML > Translation Management > Jobs and cancel the jobs.

Also, take note that if the string was already translated on the WPML Translation Editor, then it would be expected for them to show up, as they are saved to the editor's translation memory.

---

You can send field labels and choices for translation via the Translation Management dashboard if needed.

Guide: https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/translating-acf-field-labels-with-wpml/

If this will not solve the issue, please let me know.

Best regards
Andreas

April 12, 2025 at 6:27 am #16924931

Ton

Hello,

Before the latest update this was not an issue.

Now my English pages periodically are broken after the latest updates.

Please take a look at the code below:
include(locate_template('components/' . get_row_layout() . '/' . get_row_layout() . '.php'));

This somehow (while I never translated them or created any translation job) does not work anymore.

Please not that I do NOT want to translate any ACF Group Fields labels etc in ANY way. Yet somehow this doesn't work all the sudden.

So I will explain you what this is supposed to do.
This code
include(locate_template('components/' . get_row_layout() . '/' . get_row_layout() . '.php'));

Should for example retrieve my "content_met_voorbeeld_slider", which is an ACF flexible content field.
So this would than be
include(locate_template('components/content_met_voorbeeld_slider/content_met_voorbeeld_slider.php'));

But WPML somehow translates this to "content_with_example_slider", wich I never said it should do.
I can't even find this "content_with_example_slider" in the string translations.

I also added a PNG to show you what should not ever be translated.

should_not_translate.png
April 12, 2025 at 7:35 am #16925010

Ton

For now I temporarily fixed it by changing to the default WP editor.
Saving all pages (with no changes).
Revert back the WP editor to the ATE

April 12, 2025 at 6:04 pm #16925586

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I am glad to hear that you found a workaround.

Does this mean that switching the translation method to "WordPreess Editor" and after back to "WPML Translation Editor" solved the issues for all the affected contents?

The issue did not occur again after that?

April 14, 2025 at 6:13 am #16927248

Ton

I am monitoring these pages every day now to see if it happens again.
Keep the ticket open for a week please so I can report back here if it does happen again.

For now it did not yet happen again.

And yes, it fixed it for all the affected contents.

But still, it's weird it translated the slugs of the fields all the sudden. I never told that it should do that.

April 15, 2025 at 9:29 am #16932751

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

The reason for these values to appear inside the translation editor might be that your field group is set to "Expert" mode and the fields are set to "Translate" while they should be set to "Copy".

Guide:
https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/recommended-custom-fields-translation-preferences-for-acf-and-wpml/

April 15, 2025 at 12:53 pm #16934128

Ton

Nope, I set everything to "translation" (Same fields in all languages) for the groups in this case.

This is because we have automatic translation active.

But for now everything looks like it's working.

April 15, 2025 at 2:16 pm #16934577

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

OK, I am glad to hear that it works now 🙂

It might be that maybe in the past the field was set to "Translate" and what you see on the translation editor is only appearing because it is already saved inside the translation memory.

In case you run into further issues, please let us know and we will take a closer look.