Skip Navigation

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

Problem:
The client was unable to translate buttons created with Advanced Custom Fields (ACF) and had issues with URL slugs not being correctly translated or saved, particularly for the German language version of their site.

Solution:
1. To translate the button names, we advised the client to change the translation preference for the ACF fields from "Copy" to "Translate" by:
- Going to "ACF → Field Group" and selecting the relevant field group.
- Changing the Translation mode to "Expert" at the top of the page.
- Setting the translation preference for the specific field to "Translate" and saving the changes.
- Making a small edit to the page title in the default language and saving, then updating the translation.

2. For the German URL slugs, we recommended:
- Switching to the German language in the Admin Dashboard using the language switcher.
- Navigating to Pages > All Pages.
- Using "Quick Edit" to update the slug for the German page and saving the changes.

3. If the client was manually adding German translations and then using the Translation Editor, we noted that the manual changes would be overwritten. We suggested always manually adding translations if they started that way.

4. For translating links in the Advanced Translation Editor, we provided a guide: https://wpml.org/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/#how-can-i-translate-urls-in-the-advanced-translation-editor

If the solution provided is not relevant due to being 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 you still need assistance, please open a new support ticket at our 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.

This topic contains 7 replies, has 2 voices.

Last updated by Prosenjit Barman 9 months ago.

Assisted by: Prosenjit Barman.

Author Posts
March 12, 2024 at 7:24 am #15397842

mischaS-8

I am trying to: Translate buttons made with ACF. Some are not added into Translation list. Some are in. Translations and direct entry on 2nd language page editing are not saved, and I still see the English version.

Link to a page where the issue can be seen:
hidden link

I expected to see:
I expected to see French translation for the buttons. The CTA from Contact Form 7 is fine, translated.

Instead, I got: Buttons not translated.
List of CTAs:
Solution Brochure
Download Solution Brochure
Contact Zoot

wpml-issue.jpg
March 12, 2024 at 11:07 am #15398870

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

I understand the issue you're having. It seems the translation preference for the field where you're inserting the button name hasn't been configured properly, which is why, the name is not getting translated. Could you please share the name of the field where you're inserting the Button name? So that I can check in the WPML Debug Info and guide you on what to do next.

Additionally, please check if the Button text can be translated from the String Translation.

- Please go to "WPML > String Translation"
- Search for the button text, for example: Solution Brochure
- If that text appears in the result, click on the "+" icon below the language Flag and add the translation for that text.

Let me know the update. I'll be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

March 13, 2024 at 11:33 am #15403389

mischaS-8

Thanks for the feedback. Here are the details

Service page template in ACF.
Same fields across languages set.
Translations of CTAs are not working for:

In section 1:
Field label - Banner (group) > Field Label - Button, Field Name - button.

Reasult: not included in translation, translation not displayed.

In section 2:
Field label - Text block (group) > Field Label - Button, Field Name - button.

CTA text: Download the Solution Brochure >> field-form_description

Reasult: visible in translation, translated, but translation not displayed.

Page: hidden link

I checked in Strings - Solution Brochure is missing.

March 14, 2024 at 6:59 am #15407624

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thank you for sharing the name of the field.

The translation preference for the fields are set to "Copy", which is why, the same name keeps showing in the translated version of the page. To translate the name, you need to change the Translation mode for the field group to "Expert" first and then set the translation preference for the field, where you're entering the name to "Translate". Here are the detailed steps:

- Navigate to "ACF → Field Group" and open the Field group which includes the specific field.
- At the top, there is an option to modify the Translation mode. Click on the "Change Option" link there.
- Choose the "Expert" mode from the available options.
- After selecting "Expert" mode, scroll down to the field where you're inserting the button name
- Adjust the translation Preference for that field to "Translate" and save your changes.
- Open the default page, where you have the buttons, in WordPress Editor
- Make a small change in the title and save the changes.
- Try to update the translation. You should now see the button name in the translation editor.

Please let me know how it goes. I'll be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

March 20, 2024 at 11:54 am #15430918

mischaS-8

Hi,
Thank you for the feedback. I have resolved the issue for the language 2 - French. But the issue persists for the language 3 - German.
Generally talking, it's not user-friendly, first I have to use Option 1 - Same fields across languages. It's what the solution recommends for new sites. But. It does not work for links and CTAs...
So then, as you advised above, I must switch to Option 2 - Expert mode. Finally, I have all translations for Language 2, but Language 3 is missing key things:
1 - URL alias are not formed properly based on the German page titles, and when I enter alises manually, they are overwritten later. So, I need a solution to have German URL aliases for German language. While it worked for French it does not work for German.
Now the links from German pages send users to English URLs.
2 - Links and CTAs on buttons do not work on German. They are not included into translations. Manual insertion is overwritten.
Could you please advise what should I do with the language 3? Thank you
here is the page to check: hidden link

March 21, 2024 at 4:37 am #15434247

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,

Glad to hear that the suggestions helped to fix the issues on the French page.

Now, Given that you're still experiencing issues with links and CTAs on the German version, here's a recommended approach:

1. If you're adding your German translations manually, please ensure to always do so manually. If you opt to use the Translation Editor for inserting the German translations at any point, be aware that any manual changes previously made will be overwritten.

2. If you're using the "Advanced Translation Editor" to translate the contents, you can search for the links in the editor and translate the links so that they can point correctly in other languages. To understand how you can translate links, please check this guide: https://wpml.org/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/#how-can-i-translate-urls-in-the-advanced-translation-editor

Hopefully, the issue with incorrect links on German pages will be solved after adding the correct translation.

3. I have checked the link you've shared and noticed that the Button links are still pointing to the English version but, the Button text appears properly translated. Would you please follow the suggestions mentioned in point 2 and check if that helps in solving the issue? If you're still having issues, please ensure that the translation setting(Expert) for the field group and the translation preference for the associated fields(Translate) appear on that page and are configured properly.

Once done, you will have to make an update on the default page and then update the translation using the Advanced Translation Editor. The field values and link as well should appear for translation in the editor.

Let me know if the information above helps or if you need further assistance in this matter. I will be happy to help.

Best regards,
Prosenjit

March 28, 2024 at 7:45 pm #15462491

mischaS-8

Hi Prosenjit,
Please cover my question on aliases / urls / slugs (the address after the slash). I can't set German aliases, it's a third language, while it worked on the second.
I set German aliases on Page editing level in Yoast, and later they turn back to English.
So I get hidden link instead of hidden link
How can I fix that?
Thanks

March 29, 2024 at 8:24 am #15463330

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,

I'll do my best to address your question about the URLs. From the WPML Debug Info, I noticed that the "Page URL" in "WPML > Settings" is configured to translate. As a result, when translating pages/posts, you should be able to translate the page url/slug (which appears after the slash '/', in your case about-us) from the translation editor.

If the page slug is not showing translated or showing the same as the default language, the page might have been translated when the "Page URL" option was set to either 'Auto Generate' or 'Copy'.

Given that you've already translated the pages, you can do the following to update the slug of the pages:

- From the Admin Dashboard, use the language switcher on the top bar and switch to the German language.
- Proceed to Pages > All Pages.
- Find the German page with the incorrect slug.
- Click on the "Quick Edit" link located under the page.
- Update the Slug of the German page as needed and save your changes.

I hope you can understand the process. Please feel free to let me know if you need further clarification or assistance with the process. I will be happy to help.

[In order to keep each thread clear and organized, we adhere to a policy of discussing one issue per thread. Since the issue you brought up in your last message differs from the initial issue reported, I've created a separate ticket for you to address this new issue. A response will be sent to that ticket shortly. Thank you for your understanding.]

Best regards,
Prosenjit

April 4, 2024 at 8:58 am #15481684

mischaS-8

Thanks a lot for your help.