Skip Navigation

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

Problem:

Using Elementor and the price Table widget.

In the "Pricing" section of the widget, I set the Currency Symbol to 'None', and (optionally) added a $ to the 39.99 price. Is there is a way to get WPML to include the price text field for translation via Translation Editor, along with the Heading, Period, Button Text etc?

Solution:

- Go to WPML > Settings > Custom XML configuration and add next XML code:

<wpml-config>
    <elementor-widgets>
        <widget name="price-table">
            <fields>
                <field type="Price Table: Heading" editor_type="LINE">heading</field>
                <field type="Price Table: Sub-Heading" editor_type="LINE">sub_heading</field>
                <field type="price" editor_type="LINE">price</field>
                <field type="Button text" editor_type="LINE">button_text</field>
                <field type="Footer info" editor_type="LINE">footer_additional_info</field>
            </fields>
            <fields-in-item items_of="features_list">
                <field type="Item text" editor_type="LINE">item_text</field>
            </fields-in-item>
        </widget>
    </elementor-widgets>
</wpml-config>

- Make a small change to the default language page and click to update the translation.

Relevant Documentation:

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

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

Last updated by richardB-51 3 years, 11 months ago.

Assisted by: Dražen.

Author Posts
July 12, 2021 at 1:45 pm #9178743

richardB-51

Using Elementor. The Price Table widget is noted as supported at

https://wpml.org/documentation/plugins-compatibility/elementor/

However in the Translation editor (as when click the + or circle arrow) the currency and price value fields are not seen, only 'words' like Heading, SubHeading etc.

July 12, 2021 at 2:23 pm #9179031

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

you have been disconnected from chat so I have converted this to a ticket.

Please check the shared documentation and let me know if I can do anything to help.

Also, maybe you can recreate this simpler example on the sandbox site shared, and I will see if there is anything I can do to help.

ie. we (and I presume all the other WPML+Elementor users) could therefore get by with just having the amount field available for translation.

Link: hidden link

Thanks,
Drazen

July 12, 2021 at 2:38 pm #9179115

richardB-51

Hi Dražen,

Not sure what happened at my end with the chat connection, sorry. Thanks for the email continuation.

I've made the edit to your sandbox site, on page WPML test EN.

ie. in the "Pricing" section of the widget, I set the Currency Symbol to 'None', and (optionally) added a $ to the 39.99 price. This is accepted by the Elementor widget and shows up on the page as part of the price. Just can not set a size on the currency (as it is not the currency icon), which is not really an issue.

So if there is a way to get WPML to include the price text field as part of translation, along with the Heading, Period, Button Text etc (all of which can be handled by WPML at present) that would likely make it work good enough for most people. Period (supported) is a field in the Pricing part of the widget.

July 13, 2021 at 7:03 am #9182663

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello Richard,

I have checked the test site and managed to get it working as per your wishes.

Please refer to the next documentation for more info and future:

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

Go to WPML > Settings > Custom XML configuration and add next XML code:

<wpml-config>
    <elementor-widgets>
        <widget name="price-table">
            <fields>
                <field type="Price Table: Heading" editor_type="LINE">heading</field>
                <field type="Price Table: Sub-Heading" editor_type="LINE">sub_heading</field>
                <field type="price" editor_type="LINE">price</field>
                <field type="Button text" editor_type="LINE">button_text</field>
                <field type="Footer info" editor_type="LINE">footer_additional_info</field>
            </fields>
            <fields-in-item items_of="features_list">
                <field type="Item text" editor_type="LINE">item_text</field>
            </fields-in-item>
        </widget>
    </elementor-widgets>
</wpml-config>

Make a small change to the default language page and click to update the translation. Price and all fields are there, image attached.

Let me know how it goes.

Thanks and kind regards,
Drazen

Screenshot_2.jpg
July 13, 2021 at 12:01 pm #9186289

richardB-51

Hello Dražen,

Thank you so much for this. It worked !

By looking at the example you provided, and the Elementor widgets code, I was able to work out how to add a couple of the other fields that we use in the Price Table widget, and also a section for the 'Price List' widget (we only use two fields in that, so not all fields are included), as below.

Thank you again for your superb support.

Richard

<wpml-config>
    <elementor-widgets>
        <widget name="price-table">
            <fields>
                <field type="Price Table: Heading" editor_type="LINE">heading</field>
                <field type="Price Table: Sub-Heading" editor_type="LINE">sub_heading</field>
                <field type="price" editor_type="LINE">price</field>
                <field type="period" editor_type="LINE">period</field>
                <field type="ribbon" editor_type="LINE">ribbon_title</field>
                <field type="Button text" editor_type="LINE">button_text</field>
                <field type="Footer info" editor_type="LINE">footer_additional_info</field>
            </fields>
            <fields-in-item items_of="features_list">
                <field type="Item text" editor_type="LINE">item_text</field>
            </fields-in-item>
        </widget>
        <widget name="price-list">
            <fields-in-item items_of="price_list">
                <field type="Price List: title" editor_type="LINE">title</field>
                <field type="Price List: price" editor_type="LINE">price</field>
            </fields-in-item>
        </widget>
    </elementor-widgets>
</wpml-config>