Skip Navigation

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

Problem:
The client was unable to translate the "the7 mini cart popup".

Solution:
1. We registered the option popup of the widget "The7 Menu Cart" for translation by adding custom XML configuration code to WPML > Settings > Custom XML Configuration:

<wpml-config>
  <elementor-widgets>
    <widget name="the7-woocommerce-menu-cart">
      <fields>
        <field type="Popup ID" editor_type="LINE">popup_id</field>
      </fields>
    </widget>
  </elementor-widgets>
</wpml-config>

2. We instructed the client to go to Templates and translate the header template "the7 header minimal".

3. We guided the client to navigate to WPML > String Translation and translate the popup ID with the translation ID, as shown in the attached screenshots.

For more information, we provided a link to our documentation on how to register page builder widgets for translation: https://wpml.org/documentation/support/language-configuration-files/how-to-register-page-builder-widgets-for-translation/

If this solution doesn't look relevant, 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.

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by Long Nguyen 1 year, 6 months ago.

Assisted by: Long Nguyen.

Author Posts
November 1, 2023 at 1:19 am #14704533

jeffC-16

Hi,

I've tried translating my "the7 mini cart popup" but it hasn't been translated. See attached image.

And with the translated template, is there a way to delete the translation? Thanks.

Screenshot 2023-11-01 121816.png
November 1, 2023 at 2:59 am #14704861

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Jeff,

Thank you for contacting WPML support, I'd be happy to help you with this issue.

It looks similar to this issue https://wpml.org/forums/topic/i-need-help-with-the-translation-of-an-elementor-template/#post-13339637

Please follow the steps that my colleague suggested and see if it helps. If not, I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated. Your next reply is set to private to share the info.
❌ IMPORTANT: Please backup your database and website before proceeding ❌

If you want to delete the template translation, please edit the template in English > Switch language to Chinese with the language switcher at the topbar > Move it to the Trash and delete it in the Trash.

Look forward to your reply.
Thanks

November 2, 2023 at 2:01 am #14711923

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

The problem is the header template is not translated into Chinese and the option popup of the widget "The7 Menu Cart" is not registered for translation. I fixed the issue with the following steps:

1. Add the custom XML configuration code below to WPML > Settings > Custom XML Configuration to register the option popup of the widget "The7 Menu Cart" for translation:

<wpml-config>
  <elementor-widgets>
    <widget name="the7-woocommerce-menu-cart">
      <fields>
        <field type="Popup ID" editor_type="LINE">popup_id</field>
      </fields>
    </widget>
  </elementor-widgets>
</wpml-config>

2. Go to Templates > Translate the header template "the7 header minimal".

3. Go to WPML > String Translation > Translate the popup ID with the translation ID. Please check screenshots attached.

Refer documentation https://wpml.org/documentation/support/language-configuration-files/how-to-register-page-builder-widgets-for-translation/

Look forward to your reply.
Thanks

Edit Template “The7 迷你购物车弹出式窗口” ‹ Cross Border Friend — WordPress 2023-11-02 08-59-28.png
String Translation ‹ Cross Border Friend — WordPress 2023-11-02 08-49-59.png
November 2, 2023 at 3:44 am #14712243

jeffC-16

Hi,

Thanks for that, but since then my translated site has came up with a secondary header menu as shown in the image. This header does not appear in the original language. Hopefully you can reply to this asap as this is quite critical for the whole site to work, thanks

Screenshot 2023-11-02 144431.png
Screenshot 2023-11-02 144025.png
November 2, 2023 at 4:49 am #14712439

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

The issue occurs because the header template in Chinese is not set to display on the Entire site so both Elementor header and theme header are displayed. I fixed that issue on your site. Also, please don't move the translation of the popup template to the trash. I've restored it back to make it work properly.

I hope I was helpful. Don't hesitate to ask if you find any problem along the way, I'll gladly help you.

November 2, 2023 at 5:10 am #14712451

jeffC-16

Hi Long,

Thanks for fixing the issue. Can I please know how do you fix that please? I have got this issue earlier when I automatically translate the whole site and alot of these unused template just appear in the site out of no where.

Also with the translation template, may I know how do you find which one to translate? I am having trouble figuring out what to do when alot of these unused template all appeared in the translation. I would have thought my mini cart template is the one with small letter "the7" since that is what shown in the Edit in Elementor header. (See image). Can you please advise on this?

And also with the XML configuration on the mini cart, may I know this procedure doesn't need to be done when I am translation the pop up menu and pop up filter template? They are all also being provided by third party theme. I just translate them in the Translation Management and it was working alright.

Thanks.

Screenshot 2023-11-02 160957.png
Screenshot 2023-11-02 160924.png
November 2, 2023 at 7:12 am #14712829

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

You are right to find the template: visit the page in the frontend > hover over the Elementor button in the admin bar > edit the popup template. In the admin area, you can translate the template when editing it.

If you want to find the correct template in the list, you can see the post ID in the URL. I also suggest removing other templates with a similar name if not needed.

Regarding the header template, I just delete the translation template in Chinese > Re-translate it to sync the condition display of Elementor (Entire site).

Regarding the custom XML configuration code, it supports registering the popup ID option for the widget "The7 Menu Cart" only. If you use another widget, you will need to create another XML configuration code to register the popup ID option for that widget.
Please follow the documentation https://wpml.org/documentation/support/language-configuration-files/how-to-register-page-builder-widgets-for-translation/

Thanks.

Edit Template “the7 mini cart popup” ‹ Cross Border Friend — WordPress 2023-11-02 14-06-32.png
November 2, 2023 at 9:01 am #14713823

jeffC-16

Hi Long,

Thanks for answering. I've went through the XML configuration documentation, but my godness that is crazily complicated...

The process of the video provided doesn't seems the same with what you've done for me on the menu cart earlier. With the code given in the documentation, there was a condition key where you'll need to replace it by doing a sequence of work, but your code seems a little different. How did you find the widget name to be "the7-woocommerce-menu-cart" when the name of it is "the7 mini cart popup"?

Can you help me to translate the mob menu as another example please? I've got a series of massive codes during Unserialise when I was trying to translate it... (as you can see in the image, I got different type of Widget type here)

Thanks!

Screenshot 2023-11-02 200013.png
Screenshot 2023-11-02 195914.png
November 3, 2023 at 3:19 am #14722009

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

According to your screenshot, there are 14 widget types and you should check all of them to find the widget needed. I just follow step-by-step in the documentation to find and translate the widget.

Besides that, you can use the plugin Multilingual Tools to get the custom XML configuration code when editing the template/post, please check screenshot attached. And follow the documentation
https://wpml.org/documentation/related-projects/wpml-compatibility-test-tools-plugin/

And here is the custom XML configuration code to translate the text of The7 Login widget in the mobile popup menu, the condition tag is not needed in this case so I removed it.

    <widget name="the7-login-widget">
      <fields>
        <field type="Logged out text" editor_type="LINE">logged_out_text</field>
        <field type="Logged out URL" editor_type="LINK">logged_out_link>url</field>
        <field type="Logged in text" editor_type="LINE">logged_in_text</field>
        <field type="Logged in URL" editor_type="LINK">account_link>url</field>
      </fields>
    </widget>

I also suggest you contact the theme author and ask them to add custom XML configuration code for their widgets to the file wpml-config.xml then you can translate all the widgets easier.

Thanks.

Edit Post “Test post…” ‹ WPML Testing — WordPress 2023-11-03 09-53-23.png