Reports

Reports

The sales reports groups all the sales for a product in all the languages. The admin language filter is not used to define the sales per language. It just allows you to choose in what language the product is displayed.

Managing orders

Managing orders

Orders are assigned a language, allowing  emails sent to the customer to be in this language.
Note: the emails are translatable in the Strings translation panel.
The language information is provided, for example, to allow the shop owner to send order notes in the customer’s language. When the admin language filter is not activated and displays ‘Show all languages’, all orders in all languages are visible.

If you are in charge to treat the Spanish orders, activate the admin language filter with ‘Spanish’. You will see only the orders in Spanish and the language column won’t be displayed anymore.
When editing an order, the language is visible in a metabox which allows you to send your order notes in the customer’s language.

Product CSV Importer and Exporter

Product CSV Importer and Exporter

The WooCommerce CSV importer and exporter are supported by Polylang for WooCommerce.
Importer
You need to use WooCommerce 3.2 or later. Your CSV file must contain one row per product and per language. It’s however possible to use multiple files, for example one file per language.
Configure the CSV file
Your CSV file contains a list of product and their translations and you need to identify the language of each row, and which rows are the translation of each others. To achieve this you need to create a ‘Language’ and a ‘Translation group’ column.

Language: you must specify the language code. You can find it in languages list table, column ‘Code’.
Translation group: you must specify a value which identifies to which translation group this product belongs. This value must be unique to the translation group.

In the example below, we import one product in 3 languages. All rows which are the translation of each other are sharing the ’20’ value.

As shown below, you can use the SKU as unique translation group. As WooCommerce imposes to use one column per field, you need to copy your SKU values and paste them in the Translation group column. Be careful: as opposed to the SKU there isn’t any warning if you reuse an existing identifier for the translation group.

If you want to use one file per language, you need also to create a ‘Language’ column and a ‘Translation group’ column. This will allow to identify which row from one file is the translation of the other rows in the other files.
For example below is a CSV file which contains English products:

And another file with its French translations:

Import the CSV file
Once you have correctly created your CSV file, you can run the WooCommerce importer. In the Mapping screen, assign the ‘Language’ and the ‘Translation group’ fields to your corresponding colums and run the importer.

Exporter
When exporting products, you can choose to add the ‘Language’ column and the ‘Translation group’ column as shown below:

Here is an example where we exported one product available in 3 languages. We get one row per product and per language. All rows which are the translation of each other are sharing the same translation group.

Managing Products

Managing Products

With Polylang for WooCommerce, the translation is directly done in the WooCommerce interface. You translate WooCommerce products, categories, tags and global attributes using the same way as for posts.
It is very important to assign a language to all existing products, categories, tags and attributes otherwise they won’t be displayed on frontend.
Note: Polylang Pro allows you to share the same URL slug across the translations.
1. Translating
1.1 Translating global attributes
1.2 Translating products categories and tags
1.3 Translating products
2. Which automatic actions are done by Polylang?
2.1 Polylang copies and synchronizes
2.2 Polylang translates and synchronizes
1. Translating
1.1 Translating the global attributes
You must translate the attributes and their terms before using them in your products. Otherwise you will have some synchronization issues between the product translations.
Translating the attribute name and slug
The attribute name and its slug are translatable in the Strings translations panel.
The attribute name is found in the ‘Woocommerce’ group. The attribute slug is found in the ‘URL slugs’ group and is available for translation only if you are using Polylang Pro and you enabled the ‘Enable Archives?’ option.

Translating the attribute terms
The attributes terms are translated directly in the WooCommerce interface. Use the  icon to create a new translation or the  icon to edit it.

1.2 Translating products categories and tags
The product categories and tag are translated directly in the WooCommerce interface and it works the same way as for the post categories and tags.
1.3 Translating products
If you have existing products without language, you must assign a language to all of them.
If you are using Polylang Pro you can use the ‘Duplicate content’ feature (click on the  icon to activate it) to copy the content when creating a new translation.

Duplicating products
To save time, WooCommerce allows you to duplicate an existing product with all its metadatas. While using this feature, Polylang for WooCommerce will duplicate the product translations at the same time.
Let’s say that you have a ‘Product FR’ and its English translation ‘Product EN’, click on the ‘Duplicate’ link below ‘Product FR’ in the products list.

Polylang for WooCommerce also duplicates its English translation, resulting in the creation of ‘Product FR (copy)’ and ‘Product EN (copy)’ translations of each other.

2. Which automatic actions are done by Polylang?
The following explanations are for your information. You don’t have any action to do. When you save a product, Polylang for WooCommerce makes different actions depending on the metadata.
As a reminder, ‘synchronization’ means that a modification made in a product impacts all its translations.
2.1 Polylang copies and synchronizes
Polylang copies and synchronizes the metadata such as the SKU, the price, the tax.

Polylang copies and synchronizes the weight, dimensions and the shipping class.

Polylang synchronizes the stock across the different languages when a customer purchases a product.

The stock for the product variation is also synchronized.

The custom attributes and related variations are also copied and synchronized.

If you need to translate attributes, you will have to use global attributes.
2.2 Polylang translates and synchronizes
The Product Categories, the Product Tags, Up-Sells, Cross-Sells, Grouping are all automatically translated and synchronized.

The global attributes, previously translated, and their related Variations are also translated and synchronized.

If you activated the translation management for the media, then the Product Image and the Product Gallery are automatically translated and synchronized.

Adding endpoints in menus

Adding endpoints in menus

Step 1: Create menus
As explained in Polylang Getting started, you must create one menu per language.

Step 2: Filter the content by language
To add endpoints in the right language, you must activate the admin language filter with the wanted language as shown below:

Step 3: Adding endpoints
Once the language filter is activated with the wanted language, you can add your endpoints to your menu as usual:

Step 4: Edit the Navigation label
The navigation label is not automatically translated. You must translate it manually. In the example below ‘Edit Account’ has been translated to ‘Editer mon compte’:

Note: The endpoint URL slug ‘editer-compte’ has been translated in the Strings translations panel. You must have Polylang Pro to translate the endpoints.

Translating WooCommerce urls, emails and other settings

Translating WooCommerce urls, emails and other settings

We recommend you to read the Polylang documentation on how to use the Strings translations panel, before you start to translate WooCommerce.
1. Translate WooCommerce settings
Polylang for WooCommerce allows you to translate the WooCommerce settings such as the email notifications, the shipping methods, the checkout (Payment Gateways) and the taxes.
You should first modify your settings in WooCommerce > Settings. 
For example, you need to replace the placeholders of the WooCommerce emails as shown below ❶ . Once it done, the subject will be translatable in the Strings Translations table. As you can see the email heading placeholder ❷ has not been yet modified. It means that it is not translatable in the Strings Translations table for the moment.

Once done you modified your settings, go in Languages > Strings translations.
The WooCommerce settings are stored in the Strings translations list table in the ‘WooCommerce’ group.

Here, you can find the attribute names, the emails sent to customers, the shipping methods, the checkout and taxes strings.
You can also use the ‘Search translations’ function to find your strings easily.
Translate your strings and don’t forget to hit the ‘Save changes’ button before going to the next page.

2. Translate WooCommerce URLs
You need Polylang Pro to translate URLs
Translate Permalinks
Custom WooCommerce URL slugs are defined in Settings > Permalinks:

After having setup your Permalinks structure go in Languages > Strings translations.
The WooCommerce URL slugs are stored in the Strings translations list table in the ‘URL slugs’ group. Here you can find the product attribute base, the product category base, the product tag base, the product permalinks base and the endpoints.
Translate your strings in the ‘Translations’ column and click on ‘Save changes’ as shown below.

Once the translation is done, for an English and French site your URLs look like:
• Product category base
http://mysite.com/en/my-product-category/shoes
http://mysite.com/fr/ma-categorie-produit/chaussures
• Product tag base
http://mysite.com/en/my-product-tag-base/a-tag
http://mysite.com/fr/ma-base-etiquette-produit/une-etiquette
• Product attribute base and attribute name
http://mysite.com/en/custom-attribute-base/color/red
http://mysite.com/fr/base-attribut-personnalise/couleur/rouge
• Product Permalinks
http://mysite.com/en/my-shop/shoes
http://mysite.com/fr/ma-boutique/chaussures
Translate the endpoints
Endpoints are in WooCommerce > Settings in the Checkout and Account tabs.

The URL slug for each endpoint can be translated in the Strings translations table in the ‘URL slugs’ group:

Installation

Installation

Step 1: If WooCommerce is not already installed on your site, please install it and STOP the WooCommerce wizard. You will use it in step 5.
Step 2: Install Polylang or Polylang Pro
After you activated Polylang or Polylang Pro, STOP the Polylang setup wizard. You will use it in step 4.
Step 3: Install Polylang for WooCommerce

Download polylang-wc.zip by following the link in your purchase receipt or from your account > Downloads tab.
In your WordPress Dashboard, go to the plugins list table and click on “Add New”.
Click on “Upload plugin” and select the polylang-wc.zip file that you previously downloaded.
Activate Polylang for WooCommerce.

Step 4: After activating Polylang for WooCommerce you will automatically bе redirected tо the Polylang setup wizard thаt will take you through all necessary steps to set up your WooCommerce multilingual shop. These steps are:
License keys
To receive automatic updates you need to fill your Polylang for WooCommerce license key. If you are using Polylang Pro, don’t forget to fill your Polylang Pro license key as well.

Languages, Media, Content and Homepage and Ready
These steps which are part of Polylang and Polylang Pro are detailed in the “Getting started” just here.

WooCommerce
This step warns you that your WooCommerce pages are not translated in your other languages yet. To translate them just click on the “Continue” button. It will automatically download the WooCommerce translations in all your languages (provided that they exist on the Translating WordPress website) and generate the missing page translations.

Step 5: If you are installing a fresh site, you can now run the WooCommerce setup wizard by clicking on the button which should still be visible on all admin pages.

Working with ACF Pro

Working with ACF Pro

The compatibility with ACF Pro is provided by Polylang Pro. This integration is available only for post types and taxonomies. It does not work yet for options pages (this is planned for a future version). There is however an integration contributed by the Be API Agency to achieve that, see: https://wordpress.org/plugins/acf-options-for-polylang/.

Before you start
Translating Fields Groups

Activate Fields Groups Translation
Translate a Fields Group

Translating fields values

Customize ACF fields behavior

Ignore
Copy once
Translate
Synchronize

With translated values
With copied values

The WPML configuration file

1. Before you start
The first question to ask yourself is: “Do I need to translate the label and the instructions?”

If yes, thus you need to translate your field groups in all your languages, you should read 2. Translating Fields Groups (see below). If not, it is preferable not to translate your field groups, you can skip to 3. Translating the fields values.
2. Translating Fields Groups
2.1 Activate the Field Groups translation
Go to Languages > Settings > Custom post types and Taxonomies and activate the translation as shown here:

2.2 Translate a Field Group
Go to Custom Fields > Field Groups.
As you see in the following screenshot, the field groups are now translatable. Before translating your field groups you need to activate the duplicate tool as below, it will allow you to copy all the content from the source field group to the translation.

We recommend you to create entirely your field group with the wanted custom fields before translating it. Indeed there is no synchronization between the translated field groups. It means that a modification made for example in the English field group won’t impact its French translation.
Once you have duplicated your field group into another language, you just need to edit new field group to translate the label and the instructions.
Important note: You must not modify the field name value across your translations. You must keep the same value.
3. Translating fields values
3.1 Customize ACF Pro fields behavior
Since Polylang Pro 2.7, you have the ability to fine tune how your ACF Pro fields will behave when you create new translations for your posts (and pages, and custom post types…). This happens directly in ACF Pro’s Custom Fields sub-menu (see picture below).

There are four options:
3.1.1 Ignore
When creating a new translation, each custom field for which you have selected the ‘ignore’ option will be left blank in the newly created translation.
3.1.2 Copy once
When translating a content (post, page, taxonomy …) in another language, Polylang decides which custom fields must be copied and which ones must be automatically ‘translated’. The custom fields that will be translated are:

image
file
gallery
post object
relationship
page link
taxonomy.

It means that Polylang prefills the field with the correct value when creating new translations. For example, if an ‘image’ custom fields is translated, Polylang will try to find the translation of the linked image, if it exists. This also works when these custom fields are included in repeater fields. If the translation doesn’t exist, Polylang will keep the value as is.
3.1.3 Translate
This is very similar to ‘copy once’, although these fields are expected to be translated after the translation has been created. We suggests that you choose this option for each custom field you intent on translating yourself, or through a translation service (whether manual or automatic).
This option is only available for the following fields:

Text
Text area
WYSIWYG editor

3.1.4 Synchronize
As a reminder, ‘synchronization’ means that a modification made in a content impacts all its translations. So after creation of a translation, and when the post (or page, or taxonomy, etc.) is modified the custom fields marked for ‘synchronize’ will then behave differently given of the kind of value you want to modify.
3.1.4.1 With translated values
If you decide to modify a translated value from a synchronized custom field, Polylang will automatically synchronize the custom field of all the other translations. In the example below we set the English value of a post object field to “A post in English”. As you can see in the following screenshot its translated French value “Un article en Français” is automatically copied to the translated French post.

3.1.4.2 With a copied value

If you modify a copied value (text, number, email, url custom field …) in a synchronized custom field, Polylang will automatically keep this same value in the translated English post.
A modification made on the layouts (group, repeater, flexible content) will impact the translations. For example, if you choose to add a flexible content in a French post, Polylang will automatically add this flexible content to the translated Englih post. It’s the same behavior if you decide to remove it.
Note: These options are not available for ‘Layout’ type of custom fields, but each sub-field can be customized on its own.
Important Note: Even if you have selected the custom fields synchronization option in Languages > Settings > Synchronization (see section Custom fields outside of ACF Pro ), the options you select for each ACF Pro custom field will override this synchronization.
4. The WPML configuration file
Alternatively, you can configure the way each custom fields behave when a content is translated by writing a wpml-config.xml file. Each custom field you add to this configuration file will override the behavior selected in the Custom Fields sub-menu. Also the wpml-config.xml applies to every custom fields from every plug-in, as well as those you added manually. See our documentation: The wpml-config.xml file

Single sign on across multiple domains

Single sign on across multiple domains

The single sign on (SSO) feature, available in Polylang Pro only,  allows you to be automatically logged in across multiple domains or subdomains. Here are some situations where this feature is useful:

You are able to preview translated posts in context. Without SSO, previews are displayed on the main site.
You can see visit pages in a deactivated language (when logged in with sufficient privileges). Without SSO, deactivated languages are not visible.
The admin bar is displayed on all domains (or subdomains). Without SSO, the admin bar is displayed only on the main site.

How it works?
Let’s say that you are logged in on en.mysite.com and you want to visit fr.mysite.com. You click on the link to the French translation in the language switcher and:

The French page is first  displayed without you being logged in. The admin top bar is not displayed.
Polylang automatically redirects you on the same French page with you being logged in. The admin top bar is displayed.

Of course, the redirection does not occur for the next pages you will visit in the same domain or subdomain.
Notes:
When using multiple domains, this feature requires SSL.
Logout is automatically done on all domains or subdomains at the same time.
Polylang is not able to automatically sign you inside the customizer.

Detect the browser preferred language

Detect the browser preferred language

Go in Languages > Settings
Note that this option works when the language is chosen from the content, from the directory name in the url or from the subdomain. You need Polylang Pro and SSL for it to work when you use multiple domains.

When activated, someone visiting your homepage for the first time is redirected to the homepage in the language according to his browser preferences. If his browser preferences do not include any language of your site, the default language is used.
Polylang sets a cookie for returning visitors to be redirected to the homepage in their last browsed language. Thus, if you want to test the functionality on your site, don’t forget to clear your cookies between each test.
Here are some examples with French as default language:

Case 1: None of the browser language preferences of your visitor match the website languages. The visitor is redirected to the French home page (default language). If his last browsed page is in English, he will be redirected to the English homepage at the second visit.

Cases 2 & 3: In both cases, English is the first language in the browser preferences of your visitor which matches one of your website languages. The visitor is redirected to the English home page.
Note: If you don’t want any redirection to occur, you must deactivate the browser preferred language detection and hide the default language code in URLs by checking the relevant option in the URL modifications settings.