Using WPML to translate WooCommerce Private Store
WooCommerce Private Store is a WordPress plugin that allows you to make your WooCommerce store hidden and private, while leaving the rest of your website available to everyone. Some of our customers choose to translate their private store into multiple languages using WPML. We recommend using WeGlot or TranslatePress rather than WPML because they are easier to use and are guaranteed to work with other plugins, including all of Barn2's plugins. However, if you wish to use WPML then this article will provide basic guidance on use the two plugins together.
Please note that if you have any problems using WPML then unfortunately this does not come under our plugin support. We recommend contacting WPML support or asking your developer to investigate the problem for you.
What you will need
- WooCommerce Private Store plugin (version 1.3.6 or above)
- A recent version of WPML (version 220.127.116.11 or above)
- A recent version of WooCommerce
- WooCommerce Multilingual
Getting started and what to check
Is your site already configured by your developer?
Please make sure the following plugins and options are activated.
Are you setting up WPML yourself?
Follow the steps below:
- Set up WPML from WPML -> Languages. See the WPML Getting Started Guide for a complete reference. The initial, simple three-step setup is self-explanatory, asking you to choose your default language, a set of active languages, and a language selector. (For starters, choose the footer language selector; you can change this later.)
- Install and activate the core WPML plugin (WPML Multilingual CMS) first, followed by the other WPML plugins listed above.
Follow the steps below to set up WooCommerce Multilingual:
- Install WooCommerce, run the Setup Wizard and set up your store, including adding products.
- Install WooCommerce Multilingual, run the Setup Wizard, and add translations for all your products and categories.
Translating WooCommerce Private Store
- Install WooCommerce Private Store.
- Use one of these methods to translate the password login form:
- Use WPML's string translation to find the strings that need translating and add the translations via WPML. In WPML > Theme and plugins localization, select either 'Translate themes and plugins using WPML's String Translation only (don't load .mo files)' or 'Translate themes and plugins using WPML's String Translation and always load .mo files as backup'.
- Create your own .po and .mo files and upload them to the site. In WPML > Theme and plugins localization, select either 'Translate themes and plugins using WPML's String Translation and always load .mo files as backup' or ' Don't use String Translation to translate themes and plugins'.
Note: If you are using the Logged In Users option, which automatically unlocks the store for logged in users, then you can skip Step 3. This is because people will login using the WordPress login page which is translated by WPML, and you won't be using the password login form that comes with our plugin.