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 8 replies, has 2 voices.

Last updated by Lauren 1 month, 3 weeks ago.

Assigned support staff: Lauren.

Author Posts
August 13, 2019 at 12:04 pm #4387737

nickS-19

please note the site is a dev site....

I am trying to:
I am translating some pages but any button with an internal link does not appear as a translatable item, the name of the button does but the link won't appear. If I change the link to an external url such as hidden link it then appears as a translatable item?

The URL hidden link has 2 buttons one with an internal link and one with a link to Google.

Link to a page where the issue can be seen:
UK version - hidden link
translation link - hidden link

I expected to see:
I would expect to be able to change the internal URL

Instead, I got:
not able to change the url

August 13, 2019 at 6:10 pm #4390199

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thank you for contacting WPML support. I'll be happy to help you with this. This is likely happening because the URL field is set to link in the wpml-config.xml file. This means that the links will try to be automatically translated.

If you go to WPML -> Settings and click "Translate target links", does the url link correctly? Also, another option, you can define the url field in WPML -> Settings -> Custom XML Configuration and do not add it as type=link. Then, you should be able to see the URL field in the translation editor. Please see this documentation for an example: https://wpml.org/documentation/support/language-configuration-files/#1-1-translate-strings

Please let me know if this resolves the issue for you.

August 14, 2019 at 9:47 am #4393829

nickS-19

I tried the first bit but it didn't work.
I am not sure what to do for the 2nd bit.

I dont understand why an internal url isn't translatable but the external url is?

August 14, 2019 at 4:57 pm #4396801

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

An internal link should be automatically translated when you click "Translate link targets" as long as the page/post linking to has a translation available. Third party links, well, WPML wouldn't know what the translated link would be, so I believe this is expected behavior.

The set the links manually, you would go to WPML -> Settings -> Custom XML Configuration and add the following:

<wpml-config>
<shortcodes>
<shortcode>
            <tag>et_pb_button</tag>
            <attributes>
                <attribute>button_text</attribute>
                <attribute>button_url</attribute>
            </attributes>
</shortcode>
</shortcodes>
</wpml-config>

Then, edit the page in the original language and resave the button URL. Then, open the translation and you should see the URL available for translation.

Please let me know if you need any further assistance and I will be happy to help.

August 19, 2019 at 8:22 am #4414497

nickS-19

I tried this but it didn't work.

Why do external URLs appear and allow me to change but internal URLs do not appear?

August 19, 2019 at 5:33 pm #4417983

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**IMPORTANT**

- Please make a backup of site files and database before providing us access.

- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link

August 20, 2019 at 6:10 pm #4425877

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

When I view the translation, I am seeing the option to add the translated button URL. Please see my attached screenshot. You will need to check the box as complete and make sure the translation is 100% completed in order to see the link on the frontend. Please also try adding the full URL in the button url field instead of just the page ID.

August 21, 2019 at 7:14 am #4428417

nickS-19

I can see that it works ok on that one page now because the url is hidden link. If the url shows http:// the url is not translatable

have a look here at this translation and you can see that there is no option to change the URL. If you manually change the url to https:// and then translate it will then work ok.

hidden link

August 21, 2019 at 6:28 pm #4434645

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Actually I don't think it has to do with https or http. I think the link just needs to be updated, and then it will save. For example, I edit button url in the original page to link to hidden link and then it appeared available for translation. I changed it back to hidden link and it still shows in the editor. This is because when the link was first added, it was set to type "link" in the theme wpml-config.xml file. We now override that with WPML -> Settings -> Custom XML Configuration, but it needs to be updated in order for it to get registered. I hope that makes sense. Please let me know if you have any further questions.