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 1 reply, has 2 voices.
Last updated by Dražen 3 years, 5 months ago.
Assisted by: Dražen.
Author | Posts |
---|---|
November 9, 2021 at 4:54 am #9952347 | |
harisA-5 |
Hello!, I develop a plugin that using ACF Pro as custom field library. I want to make all of the plugin's custom field are translate able with WPML. I have successfully done this with wpml-config.xml except for the ACF repeater field. I have followed the documentation about this and also a thread here: https://wpml.org/forums/topic/xml-config-option-to-translate-repeater-custom-fields/ Is this wpml-config.xml support for ACF repeater has changed? Below is the wpml-config.xml for the repeater field: ``` And below are the compact version (issued repeater field only) of the exported php file of the ACF fields that included to my plugin to generate the ACF fields ``` if( function_exists('acf_add_local_field_group') ): acf_add_local_field_group(array( endif; |
November 10, 2021 at 1:07 pm #9965991 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello! Welcome to WPML Support. I'll do my best to help you solve this issue. Make sure you are using The Advanced Custom Fields Multilingual (ACFML) plugin. ACFML is a bridge plugin that makes WPML and Advanced Custom Fields plugin compatible. - https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/ I am afraid I do not think XML config ever worked in such a way for ACF repeatable fields. If you check WPML > Settings > Custom fields, you will see each new subfield has a unique name. So for subfield named "text", for repeatable named "rep", it will say rep_0_text, for second 1, and so on. You can set them via XML for each by defining custom field translating settings and it will work, but not in a way you tried with subfields and etc. Image attached. Another way you can try is by setting translation directly in ACF PHP/JSON file via wpml _cf_ preferences tag. You can create ACF groups with WPML normally then export and add code inside your theme/plugin and it should work fine with already set WPML settings. I hope I was helpful. Don't hesitate to ask if you find any problem along the way, I'll gladly help you. Regards, |