Skip Navigation

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

Problem:
The client is experiencing issues with button URLs not automatically changing to match the language version of the page when switching from English to another language, such as Spanish.
Solution:
We recommend the following steps to resolve the issue:
1. Add the following XML in WPML >> Settings > Custom XML Configuration section:

<wpml-config><br />  <shortcodes><br />    <shortcode><br />      <tag>vc_btn</tag><br />      <attributes><br />        <attribute encoding="allow_html_tags">title</attribute><br />        <attribute encoding="vc_link">link</attribute><br />      </attributes><br />    </shortcode><br />  </shortcodes><br /></wpml-config>

2. Open the default language page (e.g., "Fleet management software") in Edit mode.
3. Make a small change, such as adding a + sign in the page title.
4. Update the page by pressing the "Update" button.
5. Remove the small change made in step 3.
6. Update the page again.
7. Open the translated Spanish page in WPML Translation Editor, search for the button URLs, add translations, and press the Complete Translation button.

Please try these steps on your live site and let us know how it goes. If this solution does not resolve your issue or seems irrelevant 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 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.

Tagged: ,

This topic contains 7 replies, has 2 voices.

Last updated by Noman 3 weeks, 6 days ago.

Assisted by: Noman.

Author Posts
October 20, 2024 at 8:15 am #16308086

hitenP

I have other issues when you try to convert any page to eng to other other lang Button URL is change auto

Eng : hidden link
SPan : hidden link

please check attache screenshot I want to change URL as per Lang auto dectct how it's possible also one more issues check 2 and 3 button URL is not match with eng lang why ?

buton_url.png
October 20, 2024 at 3:35 pm #16308983

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting WPML Support. To translate the button links properly, could you please try to follow the below steps:

1. Take a backup of your site first for safety reasons.
2. Go to the WPML >> Settings page and press the “Scan now and adjust links” button(Screenshot attached).
3. Re-save the Permalinks from the Settings >> Permalinks page by pressing the “Save Changes” button.
4. Clear all sorts of site/server/CDN cache and see if this resolves the issue.

If the issue persists, please try to follow the below steps:
1. Open the translated page in Advanced Translation Editor.
2. Type the “http” in the search input box as you can see in the attached screenshot.
3. Translate the URL’s.
5. Press the Complete Translation button and see if this resolves the issue.

Please let me know the results,
Thank you

Tranlsate link targets.png
search the URL.png
October 21, 2024 at 5:41 am #16309984

hitenP

Hello

Thank you for the reply.. still getting issues...I have to explain again with more clarification

I have Eng version Page > hidden link
and for Spaning URL > hidden link
(I am attaching screenshot for button URL issues all the button with red square )

I have one section "Tire Management" and there is a button Name "Explore Now"
and on that button URL is hidden link
but when translating this page into Spanish and other Lang it automatically changed URL to "hidden link" this is wrong URL.

Require this URL For ENG Version : hidden link
and for Spanish language: hidden link instead of hidden link

and Same issues with "Key Feature" section all the button of learn More on "Tire Pressure Monitoring" Box
Eng version > hidden link it auto changed in spaninsh and other lang > hidden link

Can you explain how i can the button URL for other lang

keyFeature_span.png
keyFeature_eng.png
span_version.png
eng_version.png
October 21, 2024 at 3:47 pm #16313385

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for following the above steps and additional details. I’ve tried initial troubleshooting steps on your site but none of them worked so far.

To further debug this issue without affecting your live site, I have set up a fresh WP site on test server (cloudways). Please migrate your site to our test server so that we can check if it’s a theme/plugin conflict or a server-specific issue.

I’m going to share the migration details in my next private reply.

Thank you for your cooperation

October 22, 2024 at 1:52 pm #16317763

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for migrating the site to our test server. I’m able to translate the button links by following the below steps:

1. Added below XML in WPML >> Settings > Custom XML Configuration section:

<wpml-config>
  <shortcodes>
    <shortcode>
      <tag>vc_btn</tag>
      <attributes>
        <attribute encoding="allow_html_tags">title</attribute>
        <attribute encoding="vc_link">link</attribute>
      </attributes>
    </shortcode>
  </shortcodes>
</wpml-config>

2. Opened the default language “Fleet management software” page in Edit mode.
3. Made a small change, for example, added a + sign in page title.
4. Updated the page by pressing the “Update” button.
5. Removed that small change that did in step #3.
6. Updated the page again.
7. Now, opened the translated Spanish page in WPML Translation Editor and searched for the button URL’s(screenshot attached), added translation, and pressed the Complete Translation button.

Now it seems to be working correctly on our test site(screenshot attached): hidden link

Could you please try to follow the same steps on your live site and let me know how it goes.

Thank you for your cooperation and patience

button URL translation.png
button link 1.png
October 22, 2024 at 2:56 pm #16318206

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Glad to hear it solved the issue with buttons. For translating the key feature section links I added the below XML:

<shortcode>
	<tag>vc_custom_heading</tag>
	<attributes>
		<attribute encoding="allow_html_tags">text</attribute>
		<attribute encoding="vc_link">link</attribute>
	</attributes>
</shortcode>

And now it show the links in ATE as you can see in the attached screenshot.

Here are the relevant docs to generate the XML from page builder shortcodes:
https://wpml.org/documentation/support/maintaining-wpbakery-page-builder-compatibility-with-wpml/
https://wpml.org/documentation/support/language-configuration-files/register-page-builder-content-for-translation/
https://wpml.org/documentation/support/language-configuration-files/translate-custom-shortcodes-with-wpml/

Please let me know if this resolves the issue or if you need further assistance with this issue.

Thank you

Key feature link.png
Learn more link.png
October 23, 2024 at 8:39 am #16320658
hitenP

Hello this issues is resolved now i have other issues with ACF (Advanced Custom Fields) plugin I have this hidden link
and there are many ACF file string change option... pls check as per this screen shot how can I change that string to other lang ?

New threads created by Noman and linked to this one are listed below:

https://wpml.org/forums/topic/how-to-translate-acf-fields/

errorwithACF.png
October 23, 2024 at 9:26 am #16320962

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Glad to hear the button link translation issue is solved now. For the ACF fields translation problem, it’s a different issue and will be handled separately as per our support policy. I've created a new ticket for this at: https://wpml.org/forums/topic/how-to-translate-acf-fields/

If the button link translation issue is solved, please mark this ticket as resolved and we will continue working on the above ticket for it.

Thank you for your cooperation