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.

This topic contains 3 replies, has 2 voices.

Last updated by Nicolas V. 1 year, 6 months ago.

Assisted by: Nicolas V..

Author Posts
September 25, 2023 at 1:34 pm #14459109

yannF-4

Hello,

We are currently experiencing difficulties using WPML for translating Advanced Custom Fields (ACF) on our WordPress site.

Problem Description:
We have properly set the “Field Groups” (acf-field-group) to "non-translatable" in the WPML settings.

Each ACF has been individually configured to meet our specific translation needs, with groups and repeaters set to “copy once”.

Despite these configurations, the problem persists even when toggling between “copy once” and “copy”. Fields that should just copy the values, such as those of the API, do not do so.

We have attempted to modify the values in the fields of the original language and save them, to no avail, even though this solution has been suggested multiple times on the forums.
This problem is manifesting in local, staging, and prod environments.

Resolution Attempts:
We have canceled all ongoing translation jobs and returned the items to the translation basket.

The acf fields labels are being requested for translation during page translations, even though they are set as "non-translatable" in the settings. However, their fields are not being sent for translation.

We have uninstalled and reinstalled the plugins and reset the settings via the troubleshooting page, all without resolving the issue.

Even after a clean install and changes to the ACF values in the original language, the values are not being copied to the translation languages.

Request for Assistance:
We have followed all recommended steps and suggestions without finding a solution and are thus at an impasse. We are seeking your urgent assistance to resolve this issue.

We are available for any additional information and thank you in advance for your time and help.

Kind regards,

Screenshot 2023-09-25 at 15.33.22.png
September 26, 2023 at 12:21 pm #14466881

Nicolas V.
Supporter

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

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

Hello,

Welcome to the WPML support forum. Thanks for the detailed report. When it comes to ACF fields, setting up translation preferences for each field could be tricky. Let me guide you step by step.

1. How do you translate your pages? Do you use our Advanced Translation Editor (ATE) or the default WordPress editor?
- Go to "ACF > Field groups" and edit your group:
If you use the native WordPress editor, then you should use the multilingual option "Different fields", if you use ATE then you should choose "Same fields" as a starting point.

2. Expert mode
Now you mentioned that you prefer to use the Expert mode. Same thing, translation preferences will be different depending on the editor used. That's why in point one I asked you to choose between the two predetermined options. To get a good base to work with.
- Please follow that documentation to set your translation preferences correctly. According to the editor you use you will follow either the "Same fields" column or the "Different fields" column.
https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/recommended-custom-fields-translation-preferences-for-acf-and-wpml/

For example you mentioned the "repeater field" if you are using our editor you should set it as "Copy". But if you use the WP editor, it will be "Copy once". Actually to make it short, almost all fields should be "Copy once" when using the WP editor!

For your subfields inside that repeater, if you use our editor, here are my recommendations:
- "Translate" for all the fields you want to translate such as texts, WYSIWYG etc...
- Use "Copy" if you don't want to translate the field but keep the same value, for example for colors, true/false, images etc...

3. Once your translation preferences are set correctly. Please try it with a new page as you changed several times the preferences. That way you're sure you're working with the correct settings.

Let me know if it helps. If the issue persist please send me more details, maybe a screenshot or a video for better understanding.

October 3, 2023 at 8:47 am #14502445

yannF-4

Hello,

Thank you for your prompt response and initial analysis.

We have already addressed most of the points you mentioned. However, upon trying again, we continue to encounter the same issue.

Please find attached some screenshots for your reference.

Even when creating new pages, we face the same problem: ACF fields are not copied as required. As evident in the screenshots, we have entered a "Date" in the ACF fields. Despite this, the data isn't duplicated and the ACF field labels appear within the translation box, even though we have marked them as non-translatable.

We would appreciate further assistance on this matter.

I hope this helps!

Screenshot 2023-10-03 at 10.41.53.png
Screenshot 2023-10-03 at 10.41.15.png
Screenshot 2023-10-03 at 10.39.48.png
Screenshot 2023-10-03 at 10.29.36.png
October 3, 2023 at 4:15 pm #14507321

Nicolas V.
Supporter

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

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

Hi,

Few things here:
- Labels from ACF will be translatable on the first job you create but once translated they will disappear from future translations. However if you want to remove them, just add the following in wp-config.php:

define( 'ACFML_EXCLUDE_FIELD_GROUP_STRINGS_IN_POST_JOBS', true );

Ref: https://wpml.org/documentation/support/wpml-coding-api/wpml-constants/#advanced-custom-fields-multilingual-constants

- None of the screenshots shows the translation preferences for your fields but I can see that you are using our Advanced Translation Editor (ATE). So you should have selected the multilingual mode "Same fields" and then switched to Expert mode only to fine tune your preferences.

- For example, date picker fields by default will be copied to the translation, so this field won't appear in ATE ("copied" fields are not to be translated). On the other hand, Hawaii (a text field) is available for translation.

- Another thing with that particular field: maybe you don't use a date picker field but a simple text field where you enter the year typing. In that case, by default numbers are not visible in ATE because usually you don't translate them: the number 2 is 2 in all languages. Does it make sense? If you need to translate that number by another number, let me know I will provide a code to correct that.