Skip Navigation

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: America/Lima (GMT-05:00)

This topic contains 6 replies, has 1 voice.

Last updated by Andreas W. 2 hours, 5 minutes 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
Supporter

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.
Supporter

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.
Supporter

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?