Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
Set preference for a specific field with ACFML 2.0.
Solution:
Change the translation option for the field group to Expert.
Relevant Documentation:
https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/

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 12 replies, has 2 voices.

Last updated by Christian 1 year, 7 months ago.

Assisted by: Long Nguyen.

Author Posts
March 15, 2023 at 9:15 pm #13255163

Christian

I want to translate the values that I have placed into the input fields with Advanced Custom Fields:

Lot N°
1

Purchased from

Minimum estimate price
100

Maximum estimate price
150

Minimum price
100

Remarks
Shards

The use of shortcode enables the ACF entries to display in the frontend (you can find this in the backend in the Custom tabs section of the Product data:

Lot N°: [acf field="lot_n°"]
Purchased from: [acf field="purchased_from"]
Minimum estimate price: €[acf field="minimum_estimate_price"]
Maximum estimate price: €[acf field="maximum_estimate_price"]
Minimum price: €[acf field="minimum_price"]
Remarks: [acf field="remarks"]

This is the result in the frontend:

Lot N°: 1
Purchased from:
Minimum estimate price: €100
Maximum estimate price: €150
Minimum price: €100
Remarks: Shards

In the advanced translator editor however, the input values are missing, for example, "Shards" is not available for translation.

Product: hidden link

Site: hidden link

translation editor.png
backend acf shortcode.png
backend acf input.png
March 16, 2023 at 6:13 am #13256563

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Christian,

Thank you for contacting WPML support, I'd be happy to help you with this issue.

The number value is not supported to translate as the normal content in Advanced Translation Editor (ATE), it should be copied across languages. If you want to translate it, please ensure the field preference is set to Translate and search for the number in ATE. Please check this screenshot hidden link

Or you can go to WPML > String Translation to translate the field value. Please read more on the documentation https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/

Look forward to your reply.
Thanks

March 16, 2023 at 7:27 am #13256867

Christian

Hi,

Thank you for the clarification. How would I be able to translate an ACF text field which uses the ACF shortcode to display it in the frontend? The documentation is not clear to me.

Screenshot 2023-03-16 at 08.21.53.png
March 16, 2023 at 8:17 am #13257113

Christian

I just discovered this: it doesn't copy the acf number values to the translated page

Screenshot 2023-03-16 at 09.13.06.png
March 16, 2023 at 8:49 am #13257321

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Thank you for your feedback.

Please go to Custom Fields > Edit the field group > Set the field preference to Translate.
Then make a small change to the post title/content > save changes > update the translation and translate the field value.

If it does not help, I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated. Your next reply is set to private to share the info.
And let me know the post/page that you are translating.

❌ IMPORTANT: Please backup your database and website before proceeding ❌
You can use this plugin to create the backup: 
https://wordpress.org/plugins/duplicator/
✙ I would need your permission to de-activate and re-activate Plugins and the Theme and to change configurations on the site if needed. This is also a reason the backup is critical.

Look forward to your reply.
Thanks

March 16, 2023 at 11:28 am #13258731

Christian

Hi, I've noticed the ACF values copy now across languages, and also that the ACF Remarks value can be translated. Can you explain how you managed to do this? Also, can the redundant translation fields as you can see in the screenshot be removed?

Screenshot 2023-03-16 at 12.13.43.png
March 17, 2023 at 3:32 am #13265717

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Thank you for your feedback.

After making a change in the field group settings, you might need to update the post > save changes and update the translation to copy value across languages or clear the cache to prevent a caching issue.

For the redundant fields, there is no option to remove the field label and field group title from the translation editor. They are supported to translate in the WPML translation editor from ACFML 2.0, before that you need to use the code to translate the field label and the field group title is not translated.

If you want to exclude a text field value from the WPML translation editor, please change the translation option of the field group to "Expert" and set the field preference to "Don't Translate" or "Copy". Please read more on the documentation https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/recommended-custom-fields-translation-preferences-for-acf-and-wpml/

Look forward to your reply.
Thanks

March 17, 2023 at 6:43 am #13266447

Christian

So I have to follow these steps:
1) install ACF translation module from WPML
2) Go to Custom Fields > Field Group > Select expert option
3) Select only “Remarks” field (because this has a text value) for translation (both field label and value will display as translatable in the Advanced translation editor of the product page)
4) The fields with number values can be left untouched as the values will copy automatically across all languages
5) Open the product page in its original language and save it in order to take the changes into effect
6) Also empty server and browser cache
7) Start translating.

March 17, 2023 at 9:15 am #13267401

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Thank you for your feedback.

The field preference when you edit the field group should be:
- Remarks: Translate
- Number and other fields: Copy

Save changes and start translating the product.

Look forward to your reply.
Thanks

March 17, 2023 at 9:18 am #13267437

Christian

Thank you. I will try that tonight (within 8 hrs).

March 17, 2023 at 7:49 pm #13272661

Christian

Hi, the fields which are set to "copy" are displayed in the advanced translation editor. Let's say if I would set them to "don't translate", the fields would be gone in the translator, but then the values wouldn't distribute across languages. Am I correct?

Screenshot 2023-03-17 at 20.39.37.png
March 20, 2023 at 1:34 am #13279871

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Thank you for your feedback.

"Translate" or "Copy" here is the field value. On your screenshot, they are field labels and field group title and they are supported to translate in the Advanced Translation Editor (ATE). There is no option to exclude them from ATE. However, you just need to translate them at once.

>> The fields which are set to "copy" are displayed in the advanced translation editor.
No, if the field preference is set to "Copy", the field value will not display in ATE.

>> Let's say if I would set them to "don't translate", the fields would be gone in the translator, but then the values wouldn't distribute across languages.
Yes, correct.

Please read more on the documentation https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/recommended-custom-fields-translation-preferences-for-acf-and-wpml/#setting-the-translation-preferences-in-expert-mode

Look forward to your reply.
Thanks