Skip Navigation

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

Problem:
If you're experiencing issues with your shop's mega menu brand logos referring to the original language instead of the translated one,

Solution:
We recommend adding the following code in WPML -> Settings -> Custom XML Configuration to register the non-standard Elementor Widget (Image or SVG) used for brand logos and custom links for translation:

<wpml-config>
  <elementor-widgets>
    <widget name="wd_image_or_svg">
      <fields>
        <field>image>url</field>
        <field>image>id</field>
        <field>image>size</field>
        <field>image>alt</field>
        <field>image>source</field>
        <field>on_click_action</field>
        <field>link>url</field>
        <field>scroll_y</field>
      </fields>
    </widget>
  <elementor-widgets>
</wpml-config>

After adding the code, you can translate the necessary fields directly in the translation editor. For further guidance on registering custom Elementor widgets for translation, please refer to our guide:
Registering Custom Elementor Widgets for Translation.
Additionally, to translate URLs, shortcodes, and HTML attributes using the Advanced Translation Editor (ATE), you can search for "http" within ATE, and it will display all the links for translation. For more details, check out this guide:
How to Translate URLs, Shortcodes, and HTML Attributes using ATE.

Please note that the solution provided might be irrelevant due to being outdated or not applicable to your case. If the issue persists, we highly recommend checking related 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, do not hesitate to open a new support ticket in 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 8 replies, has 2 voices.

Last updated by Waqas Bin Hasan 1 year, 4 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
February 9, 2024 at 9:07 am #15284515

danielaH-13

Shop mega menu brand logos refer to original language instead of the translated one.

February 9, 2024 at 9:54 am #15284883

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

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

Hi,

Reference to our recent chat, I need to take a closer look at your site. So I request 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.

Regards.

February 19, 2024 at 6:22 am #15315968

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

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

Thank you for the access, I am working on this and 'll get back to you as soon as I find something or have a solution.

February 19, 2024 at 12:38 pm #15318215

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

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

Just wanted to update you that I am still working on this and 'll get back to you accordingly.

Thank you for your patience.

February 20, 2024 at 6:18 am #15320604

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

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

Thank you for your patience and cooperation.

I was able to fix this by adding the following code in WPML -> Settings -> Custom XML Configuration:

<wpml-config>
  <elementor-widgets>
    <widget name="wd_image_or_svg">
      <fields>
        <field>image>url</field>
        <field>image>id</field>
        <field>image>size</field>
        <field>image>alt</field>
        <field>image>source</field>
        <field>on_click_action</field>
        <field>link>url</field>
        <field>scroll_y</field>
      </fields>
    </widget>
  </elementor-widgets>
</wpml-config>

Since that Elementor Widget (Image or SVG) used for brand logo and custom link, isn't a standard one, so it needed to be registered with WPML for translation.

The above code now brings all fields of that widget into the translation editor, where you can translate as needed (see attached). So now you can go to edit "Shop - Mega Menu" in default language and click pencil icon to update the translation. And when in Translation Editor, search for the links and translate accordingly.

For future references, if you use such a widget which doesn't bring its content for translation, you'll need to register it too. Check this guide https://wpml.org/documentation/related-projects/wpml-compatibility-test-tools-plugin/registering-custom-elementor-widgets-for-translation/ for details.

Screenshot 2024-02-20 111345.jpg
February 20, 2024 at 8:40 am #15320927

danielaH-13

Hi Waqas Bin Hasan,

Thank you for your response.

I have tried to translate the following one from the HTML block: "Shop - Mega Menu". But still unable to translate these links.

FRAGRANCE TYPE
Aquatic
Aromatic
Gourmand
Woody
Oriental
Spicy
Fruity
Powdery
Floral
Citrus
GENDER
For Her
For Him
Unisex fragrances
Discovery sets

February 20, 2024 at 11:21 am #15322198

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

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

These are all available in ATE. You need to search for "http" and the ATE 'll show all these links (see attached).

Check this guide https://wpml.org/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/ for details.

links2.jpg
links1.jpg
February 24, 2024 at 12:22 pm #15340305

danielaH-13

Hi Waqas,

Thank you for your help, I managed to translate everything. However, there is a gap between the header and the slider when the website is translated. And if you click on Shop you will see that the images are missing and just plant text. Could you please, help me with this one?

Thank you in advance ,

gapInFront page.png
February 26, 2024 at 6:39 am #15342287

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

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

Thank you for the updates and glad that reported problem has been resolved.

For the other issues, I recommend opening a separate ticket because as per forum policy we can only handle one issue per ticket. So you can get more to the point help, without mixing up several issues in one long ticket.

Please feel free to close this ticket as resolved.

February 26, 2024 at 1:34 pm #15344542

danielaH-13

Thank you. Excellent support