The Product Add-On extension for WooCommerce allows you to customize your products with additional options such as input boxes, checkboxes, and dropdown menus. Since it is fully compatible with WooCommerce Multilingual, you can translate any product add-on you create with it.
To be able to customize and translate product add-ons, you will need the following plugins installed and active on your site:
- WooCommerce Product Add-Ons
- WooCommerce Multilingual
- WPML String Translation
- WPML Translation Management
- WPML Media
Translating product add-ons
There are two types of add-ons you can create for your products and both have different translation workflows. Global add-ons are used for multiple products in your store based on the product categories you select. Per-product add-ons are used for specific products.
WooCommerce Multilingual allows you to translate other strings related to Product Add-ons. This includes the labels for total cost on the front-end and also the strings used by the Product Add-On extension on the backend (WordPress administration area).
Translating per-product add-ons
Per-product add-ons are created on the product editing page, under the Add-ons tab of the Product Data section.
There, you can add any number of groups that hold your custom products’ add-ons. You can also choose how users select the options on the front-end: as checkboxes, dropdown menus, etc.
When you are done creating add-ons for a product, go to WooCommerce -> WooCommerce Multilingual. There, you will see a list of all the products in your site. Click the Plus icon for the corresponding language and the product you wish to translate. Use the Pen or Refresh icons to update the translations of existing products.
After clicking the corresponding icon, you are taken to the WooCommerce Multilingual product translation editor. Here, you can translate all fields for your product, such as title and description.
Scroll down to the Product Add-ons Group section and use the empty fields to translate all the options and labels related to your custom product add-on.
Make sure to select the Translation is complete option at the bottom of the product translation editor, before saving.
Translating global add-ons
Global add-ons are created on the Products -> Global Add-ons page. Similar to the per-product add-ons, you can add different groups of custom fields and select for which product categories the add-on should be used.
Translation of global product add-ons is performed on the WPML -> String Translation page. At the top of the page, under the Select strings within domain section, use the drop-down menu to select the wc_product_addons_strings domain.
All the strings you can translate with WPML are organized into domains, and selecting a specific domain helps us find our product add-on strings easily.
You can observe a list of all the strings that are obtained from your global product add-ons. Click on the translations link for each string and use the dialog box that appears to translate them into corresponding languages. Make sure to select the Translation is complete option for each string before saving the final translation.
Translating additional front-end fields and labels
The Product Add-On extension features some additional fields and labels used on the front-end. For example, when users select add-ons, the following additional information appears: Options total and Grand total.
These strings are translated from the WPML -> String Translation page. At the top of this page, under the Select strings within domain section, use the drop-down menu to select the woocommerce-product-addons domain.
Use the corresponding translation links to translate any listed strings.
All these additional strings are translated using String Translation (see above).
Once you have finished translating all your product add-ons, you should observe the results on the front-end. When you visit your products in one of the other languages, all of the add-on options and labels should be translated.