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.
Tagged: Not WPML issue
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> <b>Symptoms: </b> <b>Questions: </b> |
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 |
February 8, 2025 at 8:22 am #16681861 | |
volkerN-4 |
Hi Andreas, |
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: 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. |
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 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: The next time you reply, click on "I still need assistance". Video: 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: |
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, |
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: 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 My investigations: 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. |
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: |
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: And please notice also: If there is an option to schedule a call, I'm open to discussing it in German in more detail. |