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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | - | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 |
- | - | - | - | - | - | - |
Supporter timezone: America/Lima (GMT-05:00)
This topic contains 8 replies, has 2 voices.
Last updated by Andreas W. 1 year, 6 months ago.
Assisted by: Andreas W..
Author | Posts |
---|---|
November 8, 2023 at 5:04 pm #14759563 | |
andrewM-62 |
I have a custom post type called assets and each one has ACF fields with stats for that asset. These details will be different for each market/language that the asset is in. I would like only to translate the values of one of the ACF fields that has text in it called 'status', the rest are numbers or dates and don't matter. I also don't want to translate all the labels. To remove the labels translation I have used the code snippet and added it to wp-config file. When switching on translation for the ACF field that I want it only translates the English version of that asset to the new language, but I don't want to keep that value and the dropdown in the language version of the asset still has all the options in English. How do I get the dropdown values in the target language? This site is still on a local development so I have attached screenshots. |
November 8, 2023 at 10:43 pm #14761415 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Please do not set the field group to be translatable and if you translated the groups, please delete the duplicates. Further, please provide me with more details about how you are displaying the fields on the front end. To help you faster, I've enabled a private message for submitting the debug information for this support ticket. Please see this link for how to get this information from your site and give it to us: Make sure to only use the private reply form in order to provide this information. Please do not paste the debug information directly into a comment on this ticket. Best regards |
November 9, 2023 at 12:29 pm #14766689 | |
andrewM-62 |
HI, I have already disabled the translations for fields as it was not doing what I needed. I don't know what you mean by deleting the duplicate group... I am using Kadence elements to replace the taxonomy loop with dynamic content to get the ACF fields. I don't think this is relevant to the dropdown at this point as it is in the Portuguese post edit page that the dropdown is still in English. |
November 9, 2023 at 1:03 pm #14767095 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, I mean with this, that if you had set the field groups to be translatable and you actually translated the field groups, then you should now see duplicated field groups in ACF after setting the field groups in WPML to "Not translatable". This is what I meant by removing duplicated field groups. After that, try to translate the affected content again and check if this solves the issue. If not, then take note, that the view that is used for the ACF Fields inside the theme can be a reason for the issue, too. This means it could also be the Kadence Elements that are causing the issue when running with ACF and WPML. I would like to offer to have a closer look at the problem and request temporary access (wp-admin and FTP) to the website to investigate this issue further. You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it. IMPORTANT I may have to install a plugin called "All In One WP Migration" to make a copy of the website where I can investigate the issue further. However, I would also be very grateful if you could provide a staging site or copy of the website from your server yourself for this purpose. If you have any questions about creating such a staging site, you can consult your hosting provider. Just take note that WPML should be registered on this site again. If you are unable to provide such a copy of the site for testing, please let me know on this ticket. The private response form looks like this: Next time you reply, click "I still need assistance." Video: Please note that we are obliged to request this information individually on each ticket. We may not access any access information not specifically submitted on this ticket in the private response form. Best regards |
November 10, 2023 at 1:06 am #14771725 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, On this copy of your site, I can not yet see the fields on Frontend of the original content, which is why I have not tested the actual translation yet. I see you do have the "Assets" field group set to "Expert" mode and you are translating the posts "Assets" with the WPML Translation Editor. In order to translate the "Status" field with the WPML Translation Editor you need to set the field to "Translate" inside the ACF Field Group. Currently, all fields fo the group are set to "Not translate" and this is why the field values are not showing up inside the WPML Translation Editor. Only fields that are set to "Translate" will show up on the WPML Translation Editor. If you need the same field value in both languages, then please set those fields to "Copy", like, for example, the "Date Pickers". Repeater Fields like in "The Regions" or "TheRetailers" will need to be set to "Copy once". The subfields of the Repeater Group then need to be set to "Translate" or "Copy" according to your needs. Expert mode guide: Take note, that you can also set the field group to "Same fields across languages" and WPML will auto-configure the fields for you. The following constant can be placed inside the wp-config.php file to exclude the field group labels from translation: define( 'ACFML_EXCLUDE_FIELD_GROUP_STRINGS_IN_POST_JOBS', true ); Take note, that this will not take effect on jobs that were started before the constant was added. You can cancel such jobs at WPML > Translation Management > Jobs. Best regards |
November 10, 2023 at 9:34 am #14774459 | |
andrewM-62 |
I have tried all of that. This still has not translated the dropdown option for status in the Asset when editing the Assets with the WordPress editor. Everything about the Asset except the Title and excerpt will be completely different in each language/market. |
November 10, 2023 at 3:33 pm #14778551 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, My apologies, but the setup I found on the copy of your site was set to translate the content with the WPML Translation Editor and this works as expected. --- The ACF Field Group Translation Options "Same fields across languages" and the "Expert" mode are designed to control which fields will show up on the WPML Translation Editor. If you use the WordPress Editor for translating your content, then you usually should use the field group option "Different fields across languages". Anyhow, for now, please leave the setting on "Expert" mode. Further, you need to switch the translation method inside the WordPress Editor's sidebar of the original content to "WordPress Editor". --- Now, for the specific choice fields, when translating manually with the WordPress Editor, you have no possibility to edit those inside the WordPress Editor, as those are choices coming from the field group. You might need to try to locate and translate the choices with WPML > String Translation. See screenshot. Best regards |
November 13, 2023 at 9:03 am #14786439 | |
andrewM-62 |
I am really confused... I don't want to translate the status dropdown manually...I just want it to have the option in the target language by the time I get to the asset and want to select one of the options. Is this possible? |
November 14, 2023 at 3:50 pm #14800439 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, It depends on how you translate the content. If you translate with the WPML Translation Editor then you can translate the fields with this method. If you use the WordPress Editor, then there is no way to translate the dropdown fields and you need to use WPML > String Translation. Best regards |
The topic ‘[Closed] Translate ACF options value where every translation has different value’ is closed to new replies.