Since May 2, 2017, we at Tyche Softwares have started a small initiative to make our Mondays awesome. What happens at these sessions is, we group for an hour every Monday and someone from the team will have a presentation on a topic, which the team always wanted to learn. So far we have had sessions on Linux commands to speed up Day-To-Day work and Exploring WP-CLI conducted by Vishal Kothari.
On May 15, 2017, we weren’t sure of which topic to take the session on, so I pitched in and prepared a session on how to setup WPML on your WooCommerce store along with how it is to be used with one of our plugins.
So here is the documentation that I had exhibited at the presentation.
How to Setup WPML on your WooCommerce Store
Addons that come along with the purchase:
WPML String Translation
WPML String Translation
For setting up WPML, all the above mentioned plugins are needed in order to get it working as these plugins are inter-dependent. Of which WPML Multilingual CMS is the core plugin, other plugins are an addon which has a specific functionality to perform.
While activating each plugin, you will get a notice showing what all plugin are needed to complete the setup:
Once the plugins are activated, you will need to run setup.
- Select the language of your existing content.
- Select the language in which you want your content to be translated to.
- Select the language switcher.
- Register your site for finishing the setup and for future update notifications.
You will need to add your website on wpml.org and generate a secret key, in order to complete the setup:
Generate the secret key after adding the website URL where you are setting WPML. Paste the secret key on your website.
After registering your site, Run the Setup for Media.
The Media translation will duplicate all your existing media files in the selected language and for all the media files for new content will also be duplicated.
How to Setup WooCommerce Multilingual
In order to setup WooCommerce Multilingual, complete the WPML setup. Below are the steps mentioned which are needed to setup WooCommerce Multilingual.
Run the WooCommerce Multilingual Setup Wizard from the notice that is displayed.
WooCommerce Multilingual Setup Wizard:
There are a few more steps that you need to perform in order to make your e-commerce store multilingual: Advance setup for WooCommerce Multilingual
Translating Your Plugin Strings:
1.Activate the plugin you want to translate (I have taken our Booking and Appointment plugin for WooCommerce). On activating the plugin, you will find a button that will ask if you want to scan the translatable strings from the plugin. On clicking the ‘Scan now’ button, you will be taken to ‘Theme and Plugins localization’ page.
Note: Under ‘Select how to translate strings in the theme and plugins’ set it to ‘Translate the theme and plugins using WPML’s String Translation and load .mo files as backup’. As the setting says it will load the .mo files as a backup.
2. Now select your plugin and scan the strings. You can also scan your plugin from the ‘Theme and Plugins localization’ page’s Strings in the plugins section.
Translate the strings of the plugin by clicking on the ‘View strings that need translation’ button or you can find all the strings from the String Translation menu page.
You will be taken to the String Translation page.
Translating the strings:
Select the string, and add the translated string, select ‘Translation is complete’ checkbox and save the translation.
You can check the translated strings of the plugin (Bookable product) on the product page.
Translating WooCommerce products:
Go to the WooCommerce Product and select Duplicate checkbox under Language meta box:
This will generate a duplicate product in the selected language with all the settings from the existing product.
Note: Here the booking calendar is also translated in the selected language.
You can also check content setup for each product under the Multilingual Content Setup on the Edit Product page.
Syncing Booking Details For Different Languages:
As we have seen so far, products are translated and displayed in different languages on the front end. It is also important that the selected booking settings for all added products in English get synced for same products in different languages.
So what I mean here is that, when a customer adds bookings for a specific period of time and other customer selects the same product in different language, then the availability of the product should be displayed considering the booking made by the previous customer for the same product.
Let us understand this with an instance, say I am booking Hotel Country Inn for 10 days from 22nd December, 2017 to 1st January, 2018 and total bookings are set to 10 bookings. This booking is set for product Hotel Country Inn in English language as shown below:
Adding booking details for product in English language
So the product has been booked for maximum number of days and in language English. Now if a customer selects the same product in language French and for the same specified dates, then the booking calendar will show that these dates are booked as shown below:
Same product in French language shows as unavailable for booking
As you can see, the same product Hotel Country Inn when selected in French language shows dates 22nd December 2017 to 31st December 2017 disabled and as you mouse hover the dates, it shows a message Unavailable for booking as shown above written as Indisponible pour réservation.
Thus this implies that the Bookings of the products are synced with different languages to avoid over booking hassles.
You can find the settings under WooCommerce> WooCommerce Multilingual menu page, Multi-currency tab.
You can let the product calculate the price in other currency automatically, i.e., it will take the conversion rate of the selected currency from the global setup, or you can set the conversion rate for each product manually.
You can see the multi-currency functionality changes on the product page.
Setting WPML and WooCommerce Multilingual is easy and quick and it can benefit your WooCommerce store to attract its right audience. The Multi-currency functionality of the WooCommerce Multilingual plugin has a potential to bring in more sales to your store from the unexplored market.
You would be glad to know that we are WPML Partners as well.
If you are already using WPML and its extensions, we would love to hear your experience. And if you are thinking about making your WooCommerce store multilingual, WPML is your go-to tool. Drop-in your experiences in our comment section.