Connect and Translate WooCommerce Attributes
MultilingualPress is built to perfectly integrate with the WooCommerce environment. And hence it can also properly connect and translate the WooCommerce Attributes.
Let’s check how this works in this brief tutorial.
Table of Contents
Create an attribute, an example
Before connecting WooCommerce attributes in MultilingualPress, we first need to create one.
So, let’s create an attribute in our WordPress Multisite Network Shops: for example we create a color attribute in the English sub site.
To achieve that we go to Products->Attributes . From here we set the attribute name as color and the related slug as color.
After that we can then configure some Terms using the Configure Terms link shown in the picture below.
Hence we have some Terms (Blue, Gary, Green, Red, Yellow) for the color attribute.
Same attribute on different sub site: set the connection
Suppose now to set a similar attribute on another sub site, let’s say a Spanish version of the English one described in the previous section.
In that case we can similarly proceed in creating an attribute, but this time the Terms will be properly translated in Spanish language.
Let’s focus on the “Blue” Term. This in Spanish language is “Azul”. We proceed and create this Term.
At this point we need to understand how to connect the Attribute between the two sites.
We want that the color attribute in the English site is connected via MultlingualPress to the color attribute in the Spanish site. To achieve that they have to share exactly the same slug: color in this case.
As we can see the slug in the English site is color .
And similarly in the Spanish site the slug is still color.
In the following picture we see again that the color attribute in the Spanish version site with the slug set as color but we also show that the Azul Term is configured.
MultilingualPress attribute connection established
Now that the color WooCommerce Attributes share the same slug, it is easily possible to set the language relations of the Terms of through the translation metaboxes.
In fact, as reported in the picture below, when you edit one of the terms and search for related term in the other language site, MultilingualPress will try to find the term within the attribute with the same slug.
In that case and will not look for term in attribute called Size for example. Instead it will check for the slug color .
Filling the form with the “Az” values, will let MultilingualPress search within the English color Attribute, and retrieve the Azul Term.
If you want to know more about how to properly set your MultilingualPress environment have a look at our Getting Started with MultilingualPress tutorial.