Skip Navigation

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

Problem:
The client set up Generate Press Blocks with an ACF field group for translating 'choice' fields using WPML, but while the 'label' translations were working, the 'choice' translations were not appearing correctly.
Solution:
1. Ensure that Generate Press Blocks has the dynamic option available for all blocks, which might not require GP Pro anymore.
2. Verify that the Element uses the 'Query Loop' Block, as the dynamic database symbol and correct meta values appear only when used within this block.
3. In WPML > Settings > Custom Field Translation, click on Show system fields and set all fields with the prefix '_generate' to 'Copy'.
4. Edit the original Element and translate it again, following the same steps for your posts.

If this solution does not resolve your issue or seems outdated, please check the related known issues, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. If the problem persists, we recommend opening a new support ticket here.

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 4 replies, has 0 voices.

Last updated by Andreas W. 1 week, 4 days ago.

Assisted by: Andreas W..

Author Posts
February 7, 2025 at 2:51 pm #16680190

volkerN-4

<b>Background of the issue: </b>
I set up an ACF field group on my site hidden link. One field is 'choice', and the content is industry/branch. I am trying to translate these choices using WPML. I have read related documentation and tried different setup combinations in a staging area at hidden link with credentials rb / giftedcrocodile.

<b>Symptoms: </b>
The 'label' translation works correctly, but the 'choice' translations do not appear to be working.

<b>Questions: </b>
Why are the 'choice' translations not working while the 'label' translations are?
Is there a specific setup required for translating 'choice' fields in ACF with WPML?

Fieldgroup Projektinfo ACF String Translation 2.jpg
Fieldgroup Projektinfo ACF String Translation 1.jpg
Fieldgroup Projektinfo ACF 2.jpg
February 8, 2025 at 1:07 am #16681549

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

The question is, why would you like to translate the values?

It would usually be expected to translate only the labels, as those are what is displayed to the users.

The values should not be translated, as this could influence the logic of the fields.

Example:

<select name="acf[field_name]" id="acf[field_name]">
    <option value="value_1" selected="selected">Label 1</option>
    <option value="value_2">Label 2</option>
    <option value="value_3">Label 3</option>
</select>

You only need to translate the "Label 1", "Label 2" and "Label 3".

The option values should remain identical.

Best regards
Andreas

February 8, 2025 at 8:22 am #16681861

volkerN-4

Hi Andreas,
thank you for your quick response.
I'm a bit confused now. I assume that "choice" in the string translation translates the choice of the chosen label, and "label" is the translation of the field name.
In my example screenshot "Fieldgroup Projektinfo ACF String Translation 2.jpg", I like to translate the choice "Banken" into "Banks". On the English page I linked, the field name is correctly translated from "Branche" to "Industry," but the choice is still "Banken".
Maybe I'm incorrect in the WPML concept, terms, and language to understand you correctly.
Best Regards
Volker

February 8, 2025 at 3:57 pm #16682628

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Thank you for your message!

Please clarify:

Example of choice field value:

red : Red

Stand for:
choice > label

Are you able to translate "Red"?

February 8, 2025 at 5:31 pm #16682877

volkerN-4

The setup is without separation of value and label (pls see Fielgroup Projektinfo - Field Branche.jpg screenshot uploaded just now). WP internal, as I understand, is now "value" and "label" the same. In string translation, there is only one type per element in the list, named "choice," which was inserted automatically by WPML ACF.
Fieldgroup Projektinfo ACF String Translation 1.jpg is nearly the complete list, only one line is missing:
"acf-field-group-30050
group-30050-title-649c6e96303b7490ae9971b9097e529f
Projektinfo ACF"
I currently tried extending "Banken : Banken" but that doesn't change the behaviour, still "Banken" in English page and not "Banks"

Fielgroup Projektinfo - Field Branche.jpg
February 8, 2025 at 5:40 pm #16682917

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I would like to offer to take a closer look and request temporary access (wp-admin and FTP) to the site to investigate the issue further.

The required fields are below the comment section when you log in to leave the next reply. The information you provide is private, meaning only you and I can see and access it.

IMPORTANT
Please be sure to back up the site and database before granting us access.

If you can't see the "wp-admin / FTP" fields, your post and site login details will be set to "PUBLIC". DO NOT publish the data unless you see the required wp-admin / FTP fields.

The private reply form looks like this:
hidden link

The next time you reply, click on "I still need assistance".

Video:
hidden link

Please note that we are obliged to request this information individually on each ticket. We are not allowed to access any credentials that were not specifically submitted on this ticket in the private response form.

February 8, 2025 at 6:26 pm #16683017

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I am receiving a notification that the provided username is not registered on this site.

Please verify the provided information and leave me a comment on this ticket once access is granted.

In case you need an email to register such an account, you can use:
andreas.w@onthegosystems.com

February 8, 2025 at 6:33 pm #16683034

volkerN-4

Excuse me. I didn't press the final button. It's done now with your email address.

February 8, 2025 at 10:34 pm #16683300

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I have added the following hook to the functions.php file of the theme:

function add_custom_branche_after_content($content) {
    if (is_singular('post')) {
        $branche = get_field('branche');
        if ($branche) {  // Check if 'branche' field is set and not empty
            $content .= '<p>Branche: ' . esc_html($branche) . '</p>';
        }
    }
    return $content;
}
add_filter('the_content', 'add_custom_branche_after_content');

This hook adds the select field after each post content and you can see that the translation works as expected.

This seems to be a compatibility issue between Generate Press Pro, ACF, and WPML.

Would you be able to install the latest version of the theme and its plugins on a test site which I will provide, so that we can try to recreate the issue and escalate it internally?

---

The translations are still not working, even after deleting the string package and trying to create new translations.

February 9, 2025 at 6:13 pm #16684506

volkerN-4

Hi Andreas,
thank you for your engagement and the result, which doesn't make me look like a fool. 😉
Yes, please share the test site with me. And I assume I also have to enter or move a valid license for Generate Press Pro?
Warm regards from cold and cloudy Germany
Volker

February 10, 2025 at 7:46 am #16685248

volkerN-4

Another aspect: Is it maybe an issue at Generate Blocks Pro? That the GB Headline Block is not supporting the translation?

February 11, 2025 at 10:25 am #16690818

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Yes, it seems to be related to how the fields are rendered on the front end. If you are using a GP header Block for this purpose, then there might be an issue.

Please install the plugins. I am not expecting you to register them, as long we are able to use the blocks.

It would be great if you could try to recreate the issue with a simple example using the same block and settings.

One-Click-Login:
hidden link

Make sure to drop me a comment once you are done with this task.

February 11, 2025 at 2:29 pm #16692157

volkerN-4

Log for the steps I made:

Setup of the WPML Testdrive
Already existing: Theme Generate Press, Plugins ACF, WPML
My steps:
1. Install Generate Blocks
2. Enter Fieldgroup "Projektinfo ACF" with Select Feld "Branche" and all values and activate "Show in REST API"
3. Modify Post "Hello World!" and notice: GB Headline Block contains Metada Function Pro Version only
4. Install Generate Blocks Pro
5. Add Meta Field into Headline Block
6. Translate Post (no occurrence of field label "Branche" or value label)
7. Check "string translation": corresponding "acf-field-group-26" is in
8. Translate all industry values into English (but in German WPML language)
9. Check post: "Unfortunately" translation is working

My investigations:
There are two ways to integrate (ACF) Post Metadata into the Generate Blocks Headline block,
1. doing it with the standard approach on the right-sided properties panel with the switch "activate dynamic data"
2. doing it in the block properties appearing in the edit mode (see new screenshot attached) at "Dynamic Options"
I am going for option 2, which works appropriately to translate with ACF text but not with ACF value.
In your test drive, I did it with option one, and this is working fine (check with the link you shared in your last comment).
It seems there is an issue with that specific approach dealing with Generate Blocks Headline, option 1, and ACF values.

Please note: The industry codes are set up in German as the default in your English installation, and I put the English terms into German translation. It's - maybe - a bit confusing ;-).

I want to investigate it more using my stage and your test site. Can we please leave this issue open for another day? I will come back to close and/or provide further information.

Generate Blocks Headline Metadata.jpg
February 11, 2025 at 2:37 pm #16692254

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Yes, please let us investigate this further.

Please confirm if I got this right:
"GP Blocks PRO - Dynamic Block options do not display translated ACF Choices"?

February 11, 2025 at 3:50 pm #16692777

volkerN-4

Yes, that is my current assumption. But only in option two, mentioned above, not in option one.

And please notice a relevant typo:
"It seems there is an issue with that specific approach dealing with Generate Blocks Headline, option 1, and ACF values."
should be
"It seems there is an issue with that specific approach dealing with Generate Blocks Headline, option 2, and ACF values."

And please notice also:
GP = Generate Press (Theme and Plugin for Pro)
GB = Generate Blocks (Plugin)
The issue is in the Generate Blocks plugin, GB's new Headline Block.
It's not a Generate Press (Pro) issue.

If there is an option to schedule a call, I'm open to discussing it in German in more detail.