When using Advanced Custom Fields Pro, I am used to distributing the custom fields using the acf-json files that it generates. But when using WPML and ACFML, I notice that the acf-json files are not generated per language.
In my local (development environment) I configured the fields for the main language and then used the "Language" box on the top of the page to create the options for the secondary language as well. All seems fine, I see options in the primary and secondary language.
So I committed my changes and expected to see the fields in the secondary language on the live environment as well. But it does not work. No acf-json files are being generated for the secondary language in this procedure.
If I open the field settings (in the local environment) for the secondary language and save those, I do get an acf-json file. But now WPML will no longer synchronise the settings of the fields between the primary and secondary language.
I sincerely hope that I don't have to create all field groups manually. Over time and with multiple environments, this would be a lot of labor over time if changes need to be made to the fields.
What's the correct procedure to distribute fields across multiple environments?
Thank you for contacting WPML support, I'd be happy to help you with this issue.
The field group should not be translated, please go to WPML > Settings > Post Types Translation > Set the post type "acf-field-group" to Not Translatable.
When using ACF Multilingual, you only need to create the field group in the default language, the field value will be translated along with the post content.
So in your case, you only need to export the field group to the json file and import it to the second site in the default language.
Thanks for your response. I found out about this setting as well when I was comparing two environments.
Maybe it's a good idea to let ACFML change this setting automatically? Or notify the user about it needing to be changed? Or is there a use case in which the setting should be "translatable"?