Open
Reported for: Advanced Custom Fields Multilingual 2.0.5
Overview of the issue
When registering Advanced Custom Fields (ACF) via the acf_add_local_field_group()
function in PHP, the layout fields within ACF, including repeater fields, are automatically set to Don’t translate. This setting disrupts the expected display of repeater fields on the front-end in translated content.
Workaround
Instead of registering fields directly in PHP, you can utilize ACF’s ability to save field group configurations as JSON files.
Hi from version 2.1.4.2 user (released 2024-08-22).
We built our custom fields using the acf_add_local_field_group() php function, to improve their reliability, and build them following the official WPML Advanced Custom Field Multilingual documentation:
https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/setting-the-translation-preferences-for-acf-fields-created-using-php-code/
Our php-created custom fields, while they are definitely registered:
– Are not visible from the Advanced Custom Fields interface (this is problably not related to your plugin)
– Are not findable from WPML > Settings > Advanced Custom Field Translation
– Most of all, are not translated, even if the ‘wpml_cf_preferences’ => 2′ parameter is set
– This is not restricted to repeater fields, but to all kind of custom fields
Today I find out about this erratum.
It’s been 21 month this issue is going on.
Is there still no fix to be expected?
Are you looking into it?
How about, at least, modifying the official documentation to warn people about this issue, so that they don’t invest on some good practices which won’t work?
Hi there,
Thanks for reaching out. We understand the inconvenience, and we appreciate your patience.
This issue is being handled and is tagged for version 2.2.0. Unfortunately, I don’t have an ETA at the moment, but we’ll update the errata page as soon as more information becomes available.
In the meantime, if you need any help configuring the JSON files, don’t hesitate to start a chat on our support forum. We’ll be happy to assist you.
PS: Please note that all ongoing errata are linked to the plugin’s compatibility listing to make them easier for customers to find.
Hi T4ng,
We’ve added a warning at the top of the documentation you mentioned. Thanks for bringing this to our attention!
Thank you!