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