Get a fast, conversion-focused WooCommerce theme in 2024. Switch to Shoptimizer.

Home Documentation Shoptimizer Using WPML with Shoptimizer

Using WPML with Shoptimizer

WPML (WordPress Multilingual Plugin) is a powerful tool that allows you to create and manage multilingual websites.

With WPML, you can easily translate your website’s content, including posts, pages, custom types, taxonomies, menus, and even the theme’s texts. It supports over 40 languages and provides an intuitive interface for translating content, making it accessible to a global audience.

Use Case: Creating a bilingual website (English and Spanish)

Imagine you want to build an eCommerce website that caters to both English and Spanish-speaking customers. WPML can help you achieve this by translating your website’s content and ensuring a seamless experience for users in both languages.

To begin with, let’s focus on translating basic strings in Shoptimizer and CommerceKit. These include text elements such as buttons, labels, and headings.

1. Install and Activate WPML

WPML plugins

Ensure that the WPML Multilingual CMS and its associated plugins (String Translation, Translation Management, and WooCommerce Multilingual & Multicurrency) are installed and activated.

Note: It is very important that all of these WPML plugins are installed and active!

2. Setup WPML

Configure the plugin by selecting your default language (English) and the secondary language (Spanish). Follow the setup wizard to complete the initial configuration.

WPML Setup
WPML Setup Wizard

3. Translating Strings

Watch our video guide to Shoptimizer string translations to see the exact steps used.

We also have a video guide to CommerceKit string translations:

To start with we need to translate some text strings. Let’s start with “Add to wishlist” which is text from CommerceKit’s wishlist module.

"Add to wishlist" in English
“Add to wishlist” in English

The above screenshot shows what it looks like before we begin. You can see that we are on the Spanish version of the site (denoted by the /es in the URL), but the text is still displayed in English.

Next, we’re going to translate it.

String translation in WPML
String translation in WPML
  • Navigate to WPML > String Translation
  • Search for the string you want to translate (e.g., “Browse wishlist”).
  • Click on the translation icon next to the string and enter the translated text in Spanish (e.g., “Explorar la lista de deseos”).
  • Save the translation.
"Add to wishlist" has now been translated
“Add to wishlist” has now been translated

The string translation was successful and now we see it correctly displayed in Spanish.

4. Translating strings not found in WPML

Next, we’d like to translate the “Shipping and Checkout” string in Shoptimizer. However this string was not immediately visible within WPML.

The string was not found within WPML
The string was not found within WPML

Go to WPML > Theme and plugins localization and select the theme and plugins related to your product and click on the Scan selected themes/plugins for strings button.

Scan selected themes option
The “Scan selected themes for strings” button

Now you should be able to see the strings for Shoptimizer and CommerceKit and start the translation, by clicking on the Translate button.

Translating "Shipping and Checkout"
With the strings now visible, we can now click the Translate button to begin

Now, we can go to WPML > Translations and select what we want to translate, i.e. the ‘Shipping and Checkout’ string.

Now we can translate "Shipping and Checkout"
Now we can translate “Shipping and Checkout”

We do this by entering the correct phrase within the Translation (Spanish) field.

"Shipping and checkout" in Spanish
“Shipping and checkout” in Spanish

Now, we can see the string translated into Spanish on the frontend.

"Shipping and checkout" after translation
“Shipping and checkout” after translation

5. Translating CommerceKit’s Attribute Swatches

See our video guide to follow along with the exact steps required:

When dealing with variable products, you may encounter issues with translating attribute swatches. These swatches are essential for displaying product variations such as colors and sizes. Currently, CommerceKit Attribute Swatches and Attribute Galleries do not support the direct translation method.

Instead, we use the duplicate method to ensure that attribute swatches and galleries are displayed correctly in the translated product.

Problem: The translated product does not show the attribute swatches, but the original language version does.

This is the original product page in English with image swatches correctly displayed:

Original English version has swatches
Original English version has swatches

However if we use the translate method in WPML, we can see that the swatches do not carry over to the Spanish version.

Spanish versions without image swatches
Spanish versions without image swatches

Here is how to solve it.

Go to WPML > Settings and ensure that the Product and Variations (product_variation) post types are set to translatable.

Ensure that Products and Variations are translatable
Ensure that Products and Variations are translatable

Next, delete the incorrectly translated product. Navigate to the translated language (Spanish) > Products.

Find the incorrectly translated product, move it to the trash, and delete it permanently.

Duplicate the Original Product

Go to the original language (English) product edit page. Look for the Duplicate option instead and duplicate the product.

Duplicate the product
Duplicate the product

Now, you’ll be able to edit the Spanish version. Click the pencil icon to do so.

Edit the duplicate
Edit the duplicate

Click on the text you wish to translate, enter the correct phrase, and then click the check icon. When you are finished translating each string, click the Complete Translation button at the bottom of the screen.

Completing the translation in WPML
Completing the translation in WPML

Now, we can see the finished result. The Spanish version has swatches, just like the original English.

Finished result
Finished result: By using the Duplicate method, the Spanish version includes image swatches

By following these steps, you can successfully use WPML to translate your Shoptimizer store’s strings as well as more complex elements such as attribute swatches and provide a multilingual experience for your customers.

Success!

The discount has been applied. You will see it when you checkout.

There has been a problem

Unfortunately this discount cannot be applied to your cart.

$50
Off

Do you want a whopping $50 off Shoptimizer for WooCommerce?

Click the button below to get Shoptimizer for only $49. (Regular price: $99).
This is a special launch offer for today only.
Get it before it is gone!