Skip Navigation

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

Problem:
The client wants the button text to be translatable and the link to automatically adjust to the translated version of the page. They are unsure which translation preference to use for achieving this functionality.
Solution:
We recommend using the following approaches:
1. Set the translation preference to 'Translate' and use the Advanced Translation Editor to translate the URL. For detailed guidance, refer to how to translate URLs using the Advanced Translation Editor.
2. If you choose to use 'Copy Once', you can manually translate the button text and URL using the WordPress editor. However, for automatic URL adjustments and button text translations, using the 'Translate' option with the Advanced Translation Editor is the best approach.
Additionally, you can follow the discussion and solutions provided in this forum thread: WPML filter hook for ACF fields link translations.

If this solution does not resolve your issue or seems outdated, 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. Should you need further assistance, please open a new support ticket.

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: 

This topic contains 4 replies, has 2 voices.

Last updated by Long Nguyen 3 days, 6 hours ago.

Assisted by: Long Nguyen.

Author Posts
June 28, 2024 at 6:44 am #15849671

sophiaB-2

UPDATE: If I change 'wpml_cf_preferences' to "1" the button text gets copied so it is always in English. I want the button text to be translatable, but ideally the link itself is automatically adjusted to the translated version of the page. I thought I was able to do this in other sites I've built. Is this possible? If so, how do I do this?

June 28, 2024 at 6:51 am #15849718

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Sophia,

Here is the new ticket. I can replicate the issue on a clean installation of WordPress. This is a known issue and it has been escalated to our development team. Currently, there are some workarounds to display the translation button link and text in the frontend:

1. Use the preference 2 (Translate) and translate the URL in the Advanced Translation Editor https://wpml.org/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/

2. Follow the ticket below to use a WPML filter hook when outputting the URL
https://wpml.org/forums/topic/acf-fields-link-translations-arent-applied-properly/

Looking forward to your reply.
Thanks

June 28, 2024 at 1:24 pm #15852294

sophiaB-2

I have a question about option 2. What should the translation preference be to use this option? Since option 1 says to use preference 2 (translate), I assume option 2 is using "copy" or "copy once", however if I use one of those options, there is no option to translate the button text, so I am not sure how that would work. This filter might correctly change the url, but what about the button text?

For now, we have used option 1, because we need to launch the new language, but for going forward, I want to know the best way to deal with this.

Thanks.

July 1, 2024 at 1:25 am #15864013

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Regarding option 2: if you use "Copy" then there isn't an option to translate the button text and URL. If you use "Copy Once", you can translate the button text and URL manually with WordPress editor.

If you translate the button text, URL and use the Advanced Translation Editor, option 1 is the best way.

Refer to this documentation https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/

Thanks.

February 25, 2025 at 1:33 am #16743709

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

This issue has been resolved in the ACF Multilingual version 2.1.5. Please update it to the new version and recheck the issue.

Thank you.