WooCommerce MailChimp Newsletter Discount Translation using WPML

In order to translate the WooCommerce MailChimp Newsletter Discount Plugin’s setting pages and text contents to any other language, WPML plugin could be used. Apart from the following steps, there is another video on this for your reference.

WPML srcset= Settings Page ” width=”282″ height=”344″>

Broadly there are 2 steps to achieve the translation using WPML plugin.

  1. Putting the field id that needs to be translated  in WPML XML configuration.
  2. Configuring translations in different languages for the above configured field ids.

Once the WPML plugin is installed and activated, go to WPML > Settings > Custom XML Configuration to make the translation related configuration.

In the Custom XML Configuration, following code could be added.

<wpml-config>
    <admin-texts>
        <key name="wcmnd_options">
            <key name="wcmnd_invalid_email_error" />
            <key name="button_text" />
            <key name="wcmnd_success_msg" />
            <key name="wcmnd_already_subscribed" />
            <key name="popup_header_text" />
            <key name="notification_title" />
            <key name="wcmnd_invalid_email_error" />
            <key name="wcmnd_mail_from_name" />
            <key name="wcmnd_email_subject" />
            <key name="mailchimp_terms_conditions_text" />
            <key name="mailchimp_terms_conditions_error_msg" />
            <key name="wcmnd_popup_text" />
            <key name="notification_message" />
            <key name="wcmnd_email_message" /></key>
    </admin-texts>
</wpml-config>

Custom XML Configuration in the WPML plugin

Above code contains some default elements of the plugin that need to be translated. If more fields are to be translated, those field ids could be found using the Inspect option in the browser as explained below.

Then, on the WooCommerce MailChimp Newsletter plugin’s setting page and choose any field and right click on Inspect to get the id of the field that needs to be translated.

Inspect

Copy the text value in the id property.

For example, suppose you want to translate the Popup Header Text.

  1. Right click inside the field, click on Inspect and copy the id property value.

copy the id of the field to be translated

2. Paste the id value in the Custom XML Conifguration’s name field and Save.

paste the id in the name field of the XML Configuration of the WPML plugin

3. Next, in order to set the translated string go to the String Translation section under WPML.

WPML > String Translation” width=”123″ height=”254″></p>
<p>Then look for ‘<strong>admin_texts_wcmnd_options</strong>’ and select it in the In domain drop down list.</p>
<p><img loading=

On the WooCommerce MailChimp Newsletter Discount Plugins contents page, there would be options to change the String and Language icon. In the following example, we are translating from English to French. But a different language could be selected as per your requirement and language options would be available here.

Add or edit the translations by clicking on ‘+’ or ‘pen’ icons.

Add or edit the translations by clicking on ‘+’ or ‘pen’ icons.

Enter the translated text as seen in the picture below and save the changes.

Enter the translated text as seen in the picture below and save the changes.

Finally, go to your WooCommerce MailChimp Newsletter Discount and preview the changes.

popup with translated text

Was this page helpful?