Background of the issue:
I'm trying to translate all my content on my site hidden link, but the buttons, which are added with Advanced Custom Fields (ACF), aren't being recognized by WPML to be translated.
Symptoms:
My buttons are not translatable.
Questions:
Can you help me translate buttons added with ACF using WPML?
Have you tried setting the button fields to Translate? Since these buttons were created using ACF (Advanced Custom Fields), you need to make sure the corresponding fields are set to be translatable.
You can do this as follows:
1. Go to WPML → Settings → Custom Fields Translation.
2. Locate the ACF field that corresponds to your button (for example, button_text, button_link, etc.).
3. Set it to Translate.
4. Save the changes.
5. Then, re-edit your page or post and send it for translation again.
The problem is that I've tried that, but the fields are locked. I guess this is because of the translation option I choose for this ACF field group ('Same fields across languages'). Is that true?
Because I would like to keep this option because all the other fields are being properly enabled to be translated, it's only the button values which are being denied in some way.
Yes, you’re absolutely right — the custom fields are locked because the “Same fields across languages” option is currently enabled.
You can make these specific custom field translatable by adding a configuration in WPML → Settings → Custom XML Configuration. So, you'll keep the option and enable translation for the button.
This solution should work — I’ve tested it locally. However, if it doesn’t work with your specific setup, please switch to “Expert” mode and manually configure the field translation settings.
Hi Andrey, your first solution works! Now my question is, will there be new 'custom fields' to add to this XML list when new content/pages are added? Or only when actual new Advanced Custom Fields are added?
No additional custom fields will be added to the list. The configuration you define there only applies to the specified custom fields and will override the settings for those particular fields only.