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 5 replies, has 2 voices.
Last updated by Mohamed Sayed 1 year, 5 months ago.
Assisted by: Mohamed Sayed.
Author | Posts |
---|---|
August 1, 2023 at 10:24 am #14132807 | |
arnoP-3 |
Hi, I am trying to remove a text from a translation, but I can't. 1. I have a custom field (created with Meta Box) with text. The text was translated. That's all fine. Shouldn't WPML remove the translation automatically if the original value was removed? Or at least give me the option to do so in the Advanced Translation Editor? Thanks, |
August 1, 2023 at 7:36 pm #14137377 | |
Mohamed Sayed |
Hi Arno, WPML will update the translation automatically only if the "Translate Everything Automatically" mode is enabled and the translation was created with the same mode. Please go to WPML > Settings > Custom fields translation, and search for the field then let me know which option is set for this field. Kind regards, |
August 2, 2023 at 12:08 pm #14142053 | |
arnoP-3 |
Hi Mohamed, The field is set to Translate, but we don't use "Translate Everything Automatically". We translate manually in the ATE, with the help of Deepl. So, in this case, if we cleared the text in English, how do we remove it from German? Thank you, |
August 2, 2023 at 3:15 pm #14143617 | |
Mohamed Sayed |
Hi, I tested this on a clean installation and I can see the same behavior. When the field value is removed from the default language, it's not displayed in the advanced translation editor but the translated value is not removed from the secondary language. I think this is expected because when the custom field is set to "Translate", it means that the field value won't be kept in sync across different languages. So you can remove the translated value manually with the following steps: 1. Edit the post in the default language Please check this recording hidden link Let me know please if that helps. Kind regards, |
August 3, 2023 at 5:13 am #14145563 | |
arnoP-3 |
Hi Mohamed, Thanks a lot, that worked for me. It does feel a bit like a hack, I'd expect the ATE to have an option for this. But if you say this is a safe way to solve this, I'm fine. Kind regards, |
August 3, 2023 at 11:47 am #14149151 | |
Mohamed Sayed |
Hi Arno, I'm glad to hear that it works. Please note that removing the value manually shouldn't affect your translations. I also checked with our developers about this behavior and they confirmed that this is expected. We filter out the blank strings and they are not sent to ATE. Thus the previous translation is not replaced and the translated field value remains in the second language. Another workaround that can help in your case, is to add a Non-breaking Space instead of keeping the original field blank hidden link Then you can update the translation using WPML's advanced translation editor and it will replace the translated value with the non-breaking space. You can also try the following filter but it works only if the meta key and value were removed, which means that the field is deleted totally not only the value. add_filter('wpml_sync_deleted_custom_fields', '__return_true'); Kind regards. |
August 3, 2023 at 12:43 pm #14149547 | |
arnoP-3 |
Thanks Mohamed. |