-
Notifications
You must be signed in to change notification settings - Fork 67
Translation
khungate edited this page Jul 25, 2023
·
5 revisions
Welcome to the guide on Translation in the MailChimp for WooCommerce Integration. This guide will help you understand how to translate the plugin using i18n (Internationalization and localization) and the POT files (Portable Object files).
The MailChimp for WooCommerce plugin supports i18n. This allows you to translate every single string of text found in the plugin using the POT file.
- Download a translation editor compatible with POT files, such as Poedit.
- Navigate to the WooCommerce for MailChimp plugin languages directory.
- Download
mailchimp-woocommerce.pot
. - Create a new translation in Poedit with
mailchimp-woocommerce.pot
. - Choose a language for the translation. You can now translate any of the source text.
- Save the file as
mailchimp-woocommerce-(the translation ending)
. For example, for Canada French, it would be mailchimp-woocommerce-fr_CA. - Upload both the
.po
and.mo
files to the languages directory of the plugin. - Change the site language in WordPress to the desired language.
- For more information on this subject, please visit the WordPress Codex.
- Add the XML config so WPML knows about this item.
<wpml-config>
<admin-texts>
<key name="mailchimp-woocommerce">
<key name="newsletter_label"/></key>
</admin-texts>
</wpml-config>
- WPML manager will be aware of this option with the above XML file.
- Add the text and save it.
- Find this section which will allow you to find the "saved option" from above.
- Save your new options in WPML