Skip Navigation

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

Problem:
Client is unable to translate the links in the "Teaser Box" from the "Total Theme" using WPML. The links in the teaser boxes are not pointing to the translated FR pages but instead to the original EN language pages.

Solution:
First, we registered the

vcex_teaser

shortcode in WPML by adding custom XML configuration. Here is the XML code to add:

<wpml-config>
  <shortcodes>
    <shortcode>
      <tag>vcex_teaser</tag>
      <attributes>
        <attribute>heading</attribute>
        <attribute>url</attribute>
      </attributes>
    </shortcode>
  </shortcodes>
</wpml-config>

After adding this code, the URLs for the teaser box in the default language became available for translation in the Advanced Translation Editor (ATE) and String Translation (ST). To translate URLs in ATE, you can search for "https" and replace it with the translated version of the URL.

Additionally, to ensure the module is registered for translation, follow these steps:
1. Open the original page with the module on the front-end to trigger module registration.
2. Update the original page with a minor change and save it. This will update the translation and add the new module to the Translation Management.

After these steps, you should be able to search for URLs in ATE and translate them accordingly.

Relevant Documentations:
- https://wpml.org/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/
- https://wpml.org/documentation/translating-your-contents/page-builders/how-to-register-page-builder-modules-and-theme-options/

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

Last updated by Stéphane 1 year ago.

Assisted by: Waqas Bin Hasan.

Author Posts
November 28, 2023 at 4:47 pm #14942799

Stéphane

I am trying to: Translate links of "Teaser Box" from "Total Theme"

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

The problem:
Teaser Box from Total Theme is supposed to be 100% compatible with WPML, but the links of the 4 boxes at the beginning of the page should link to the FR pages, but they keep linking to the original language which is EN.

I made a test page with only a teaser box, to see if the problem was coming from the page, but the result was the same: -> link was not translated

November 29, 2023 at 6:40 am #14946441

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Hello Stéphane,

Thank you for contacting the support.

Can you please go to WPML > Settings > Translate Link Targets and run the scan (see attached)? And then recheck if it helps.

Other than that you may also check in ATE and search for the links to see if these are translated correctly? See https://wpml.org/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/ for details.

Please let me know and I'll try my best to help you further on the matter.

Regards.

13568591-Screenshot_2023_05_02_at_09.51.20.png
November 29, 2023 at 1:31 pm #14951839

Stéphane

Hi Waqas,

Concerning the Translate Links Target scan, I had already done it, with no result. I did it again, still with no result.

Concerning searching for the urls in ATE, same story.

I also did all I could in the troubleshooting panel (WPML Cache and so on..) with no result.

That's why I wrote to support.

So I think, to do not loose time, the best would be that I give you access to a staging, or that I send you a duplicator copy, no ?

November 30, 2023 at 5:19 am #14957745

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Thank you for the details.

Yes please provide temporary access (WP-Admin and FTP), preferably to a test site where the problem has been replicated.

Your next answer will be private, to share this information safely.

Also provide detailed steps to reproduce the issue and links to pages in admin and on frontend.

IMPORTANT: Please take a complete backup of the site to avoid data loss. I may need to activate/deactivate plugins also.

See https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/ for details on privacy and security.

December 1, 2023 at 5:45 am #14968783

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Thank you for the updates. I'll soon look into it and 'll get back to you accordingly.

December 1, 2023 at 8:11 am #14969713

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Thank you for your patience and cooperation.

I was able to fix the problem (in your staging site) by registering vcex_teaser shortcode in WPML -> Settings -> Custom XML configuration (https://wpml.org/documentation/translating-your-contents/page-builders/how-to-register-page-builder-modules-and-theme-options/):

<wpml-config>
  <shortcodes>
    <shortcode>
      <tag>vcex_teaser</tag>
      <attributes>
        <attribute>heading</attribute>
        <attribute>url</attribute>
      </attributes>
    </shortcode>
  </shortcodes>
</wpml-config>

This is a common case among page builders, since they keep evolving and new stuff being added. This shortcode needed to be recognized by WPML (as mentioned above).

So now the URLs set for the teaser box in default language are available for translation in ATE, as well as, in ST. And you can simply search (https://wpml.org/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/#how-do-i-translate-urls-with-the-advanced-translation-editor) for "https" when updating/adding translation in ATE and replace with the translated version URL (see attached).

Since your "Translated document options" in WPML -> Settings are set to "Translate (this will include the slug in the translation and not create it automatically from the title)", you'll need to translate the slugs manually as mentioned above.

tb-st.jpg
tb-ate2.jpg
tb-ate.jpg
December 1, 2023 at 4:46 pm #14974731

Stéphane

Hi Waqas,

I see that it works on the staging and I followed your advises on the prod. website, but for a reason I ignore, the 4 http links don't appear in the ATE.

Here is what I did:

1- Copied you code in WPML settings -> Custom XML configuration
2- I scanned to adjust links in WPML setting
3- Cleared WPML cache
4- re-saved permalinks just in case
5- Purge SG Cache and Browser cache

But with all that, when I type "http" in the ATE, no url appear to be translated.

Did I miss something ?

Capture d’écran, le 2023-12-01 à 11.45.50.png
December 4, 2023 at 6:58 am #14982321

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Thank you for trying.

As mentioned in the guide https://wpml.org/documentation/translating-your-contents/page-builders/how-to-register-page-builder-modules-and-theme-options/:

Before you can see your module in the Translation Editor you need to do the following:

1. Open the original page with the module on the front-end. This will trigger the module registration.

2. Update your original page. You can do a small change like adding a period and deleting it. Just be sure that once you click the Update button the translation has the round icon and not the pencil one. If you still see the pencil icon it means that the translation was not updated and the new module was not added to the Translation Management.

So at this point all you need to edit your page, having this module or widget, make some change in the content, save and update the translation. And in ATE search for the URLs.

December 5, 2023 at 9:51 pm #15003017

Stéphane

Sorry, I forgot to make a little change...

Thanks for everything !