[Resolved] Best way to translate fields within a repeater within a clone
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing issues with fields being greyed out in the WordPress Editor and content being erased in the Advanced Translation Editor (ATE) when making changes to translations of custom fields in a Custom Post Type (CPT). These fields are part of ACF groups that are disabled and used as clone fields in another ACF group. Solution: 1. To address the issue of content being erased in the ATE, we recommend disabling the "I prefer bigger segments" feature in the ATE. This allows breaking down each sentence from a paragraph into smaller segments, helping to avoid retranslating the entire paragraph. Resave your primary language page after making this change. 2. For the greyed-out fields in the WordPress Editor, set the clone fields to 'translate' instead of 'copy'. This change will make the text/textarea fields within the clones manually translatable through the WordPress Editor.
If this solution does not resolve your issue, or if it seems outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.
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.
Background of the issue:
I have a CPT with many custom fields, divided into separate field groups and called via a clone field. Within these clones, there are repeaters, text fields, textarea fields, etc. I first translate everything with the ATE. When I want to make a change to the default language content of one of those fields, I prefer to adjust the translation using the WordPress Editor because the ATE erases the whole content of that field.
Symptoms:
Some fields are greyed out in the WordPress Editor. These fields are set to 'translate' using the expert function in ACF, but the ACF group is disabled and called as a clone into another ACF group.
Questions:
How can we adjust the translation via the ATE without erasing the content?
How can we enable editing of greyed-out fields in the WordPress Editor?
I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.
Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.
Your upcoming reply will be treated with confidentiality and will only be visible to you and me.
✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.
Specifically, what fields are the issue:
- ACF group "Highlights" contains a repeater field with a text field within it, called "cf_rtl_fac_hilite_title".
- ACF group "Algemeen" contains two text area fields: "Airco"(cf_rtl_alg_cooling) and "Verwarming" (cf_rtl_alg_heating).
- These ACF groups are disabled and called into the "Rentals" CPT via the ACF group "Rentals" as clone fields.
- I'm using the rental "La Périgourdine" as example.
- The Dutch rental has been filled with content for the highlight fields and the airco field. The verwarming field has been left empty.
- The first translation was made with the ATE, that worked fine.
- But now we want to make a change to the Dutch content, and then make a change to the translation.
- When opening the translation via the ATE, the whole translation of the field is blanked. Not a disaster with a single word, but on this website, there are many fields with paragraphs of text within them. We need to be able to make changes to those without deleting the entire field translation when editing the translation.
Option 1 (preferred): Open the ATE and adjust the translation without the changed field's translation being erased automatically.
Option 2 (workaround): Open the translation with the WordPress Editor. Now those fields are greyed out. No change can be made to the translation of these fields.
I can provide you with access. Please send me the private message so I can share this information with you.
Thanks for your reply. The recommended method would always be option 1. Could you record a short screen recording explaining the below? I would like to make sure that we're on the same channel.
"Option 1 (preferred): Open the ATE and adjust the translation without the changed field's translation being erased automatically."
Can you please send an update in the ticket when you are starting? Because my client has waiting to continue filling the website with content whilst waiting for you to have a look.
I've told them to continue. I've you let me know when you are having a look, I will tell them to stop.
That's exactly how the Advanced Translation Editor functions. When the Translation Editor scans the content and detects discrepancies, you'll need to retranslate it.
I understand that it can be quite a bit of work to retranslate everything. One option you might consider is to disable the "I prefer bigger segments" feature in the Advanced Translation Editor shown in the attached screenshot.
After that, make sure to resave your primary language page for the changes to take effect. By using smaller segments, you can break down each sentence from a paragraph, allowing you to avoid retranslating the entire paragraph.
That is very unfortunate, and highly unpractical. That is why I decided the old WP editor might be better suited in those cases.
Your suggestion of chopping up blocks into smaller chunks might help a little, but it's there for a reason: for some languages, word order is decidedly different, and translations then become very awkward. This is even more the case in the current situation where ACF fields in ATE are in the order of field creation, completely mixing up the logical page order.
Don't you think it is strange that the old method of translating is better suited for situations like this than the ATE? I cannot imagine that that is the way WPML intended it.
Question 1: Can you put a request in for changing this so the translated content is used as a starting point, not a blank field that has to be translated all over again?
Question 2: I would like to know how I can avoid the greyed out fields when using the old translation method with WP Editor. How can I do that?
Yes, I will share your feedback with our developers regarding your first question. As for your 2nd question, can I have a screen recording also? Or are you referring to the fields that are shown with a lock icon?
Hi Kor,
1. thanks.
2. I'm including a screenshot. That says enough I think:
- the icoon fields are locked. that is normal, as they are images and set to 'copy'.
- the titel fields next to it are not locked. they are text fields and set to 'translate'. But they are greyed out nonetheless, and they should not be.