Strings translation

Strings translation

1. Filter
2. Translate strings
2.1 Create your translations
2.2 Widgets translations
3. Translate URL slugs
4. Cleaning the database
4.1 Cleaning the translations
4.2 Cleaning the strings generated by the WPML functions
4.3 Cleaning the strings generated by the Polylang functions
5. Information for the developpers
Only the Administrator can access to the Strings translations.
Go in Languages > Strings translations
The Strings translations list table allows you to translate strings which are generally in the themes and plugins options.  The Strings translations list table displays the strings registered by Polylang and WPML PHP functions and by the wpml-config.xml file.
Note: when you switch from WPML to Polylang thanks to the WPML to Polylang plugin, the strings translations are imported too.
Note: The strings hardcoded in PHP files are not handled by the Strings translations list table. These strings are stored in .po/.mo files and you can translate them with tools like Poedit or the Loco translate plugin.
1. Filter

You can filter the strings translation by the group. By default the filter is on 「View all groups」.
WordPress group: Polylang always creates a WordPress group with 4 options: the Site title, the Tagline, the Date Format and the Time format. You can refer to the codex to choose date formats and time formats adapted to your languages.
Widget group: This group appears only once you have setup Widgets . You can translate here all the titles of your Widgets. The text of the Widget Text is also translatable.

Url slugs group: You need Polylang Pro to translate your slugs.

Other groups: Plugins and themes can add their own strings, generally filled by the user in the plugins and theme options.
There is also a search input field which allows you to search for source strings or specific strings names (the search dos not cover the translations).
2. Translate strings
2.1 Create your translations
You first need to fill in the relevant fields in the WordPress, plugins or theme settings the source strings.
Then go in the Languages > Strings translations, translate your strings in the Translations column and then click on 「Save changes」. If some languages are missing, make sure that the languages filter displays 「Show all languages」.

2.2 Widgets translations
If a widget title is not listed in the strings translations list table, it is most likely because the widget uses the old Widget API (WP < 2.8). Unfortunately, there is no way to make Polylang automatically compatible with all widgets which use this old API.
Widget Text: Appart from the widget titles which should all be listed, only the text of the widgets Text are displayed  in the Strings translation list table, except if other Widgets use the same filter.
Note: remember that when the text of a widget is not translatable, it is still possible to have one widget per language.
3. Translate URL slugs
Polylang Pro offers the possibility to translate the URL slugs for the category base, the tag base, the post formats, the custom post types, the custom taxonomies, the author base… To know more about this functionality, see Translate slugs with Polylang Pro.
4. Cleaning the database
4.1 Cleaning the translations

❶ Polylang stores the translations in the database (as post type 『polylang_mo』 in the 『wp_posts』 table to be precise). When a theme or a plugin is deactivated, the translations associated to its options are kept in the database, although these translations are not displayed anymore in the list table.
You can permanently delete these translations from your database by checking the 「Clean strings translation database」 option ❷ , and then clicking on 「Save Changes」.

4.2 Cleaning the strings generated by the WPML functions

❸ Thanks to the WPML compatibility mode of Polylang, some strings may be registered by the WPML functions, used by the themes and plugins. Unlike strings registered by the native functions of Polylang, and to keep the functionality as close as it is in WPML, these strings are not removed from the list table when the corresponding plugin or theme is deactivated. You can permanently delete them thanks to the delete Bulk Action.
4.3 Cleaning the strings generated by the Polylang functions

❹ The checkbox is greyed for the strings generated by the Polylang functions, or wpml-config.xml files (which may be provided by your theme or plugins). These strings are automatically removed from the list when the corresponding plugin or theme is deactivated (although the translations are kept as explained above).
5. Information for the developpers
There are 3 ways to include strings in the list table, please refer to the documentation for the developpers: 『pll_register_string』, wpml compatibility mode, wpml-config.xml.

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.

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.

What is your refund policy?

What is your refund policy?

If you have problems getting your purchased plugin to work, we will be happy to provide a full refund within 30 days of the original purchase. Before a refund will be granted, you must allow us to try to solve your problem by opening a support ticket.
After 30 days, no refunds will be given.
Refunds do not apply to license upgrades or renewals.

Translating URLS slugs

Translating URLS slugs

This feature, available only in Polylang Pro, allows you to translate the URL slugs for post formats, custom post types, custom taxonomies, as well as category, tag, author, page, attachment… The example below is for the slug 『category』 but translating other URL slugs works the same way.
Let』s say that you have created a category in French and its English translation. By default your categories URLs would look like:
• /fr/category/voyage
• /en/category/travel
As you can see, the slug 『category』 is identical whatever the language.
Go in Languages > Strings translations
Notes: You can filter the strings translation by the group 『URL slugs』. If some languages are missing, make sure that the admin languages filter displays 「Show all languages」.
In the example below the string 『category』 is translatable in French and in English. Translate the URL slugs in the Translations column, then click on 「Save changes」.

Once done, your categories URLs look like:
• /fr/categorie/voyage
• /en/category/travel

What does the customer see?

What does the customer see?

Browsing the website
Most customers will browse the website in only one language and of course everything should be translated.

Let』s imagine however that a customer starts visiting the shop in English, adds a few products to his cart and then switches the language to French.
• If the language is not set from different subdomains or domains, then the cart content will be transported to the new language.
• If the language is set from different subdomains or domains, the cart content will be reset when the customer is switching to a new language. You will need Polylang Pro to allow the transport of the content of the cart across languages while using subdomains or multiple domains.

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:

Import and Export strings translations

Import and Export strings translations

Strings translations Import and Export module is integrated by default in Polylang Pro. The goal of this module is to export all your Strings Translations in a format (the PO format) that allows you to translate them (from the default language of your site, to a language you select). And finally to import these translated strings.
Export Strings Translations
So first, go in Languages > Strings translations.
There is a metabox at the bottom of the page that allows you to export your strings translations :

❶ You can choose the language(s) in which you want to translate the strings. You will then have a translation file for each selected target language.
❷ You can filter the strings translations to export only one group, or all of them (they are grouped by core feature, plugin, or widget). By default the filter is on 「Export all groups」.
❸ Finally, click on 「Download」 to download your export file.
So you get a ZIP file that contains one translation file for each previously selected target language.
Now that you have your translation file(s), you can proceed to their translation through a professional translator, or use tools that allow you to translate this file format as Poedit.
Note: If you don』t want to do a translation, but only want to import your strings on another site, read Export strings translations from one site to another.
Import Strings Translations
Go in Languages > Strings translations.
There is a metabox at the bottom of the page that allows you to import your strings translations :

❶ Choose the file you want to import (it has to be a PO file like the exported format).
❷ Click on 「Upload」 to launch the import process.
After hitting the 「Upload」 button, a success message is displayed ❸ and you obtain your strings translated ❹ as shown below.

Note: You can only translate one language at a time, because we have one translation file per target language, and we only import one file at a time.
Exporting your strings translations from one site to another
When you export your strings translations, a 「Site-Reference」 attribute is created in the translation file, as shown here :

If you want to import this file on another site than the one from which it has been exported, you will have to change the value of 「Site-Reference」.
So you have to replace the current URL by the one you want to import your strings translations on.

Working with WooCommerce Bookings

Working with WooCommerce Bookings

Translating a bookable product

General tab
Translating and synchronizing resources
Availability and Cost tab
Persons tab

Synchronization between the bookings
Emails are sent in the booked product language
Translating WooCommerce Bookings endpoints

The compatibility with WooCommerce Bookings is provided by Polylang for WooCommerce. However, if you want to translate the bookings endpoints, you will have to use Polylang Pro too.
In the following documentation, we will mention the synchronization functionnality several times. As a reminder, 「synchronization」 means that a modification made to a product impacts all its translations. For example, if you change a bookable product value, such as a checkbox, a selected option, this change will be propagated to the product translations. This works the same way if you add or remove a range of rules in resources, availability, and cost settings.
1. Translating a bookable product
You will need to translate your bookable product in all languages. As a reminder, the products are directly translatable in the WooCommerce interface as shown here:

General tab

Polylang copies and synchronizes the booking duration, calendar display and confirmation preferences settings.

Translating and synchronizing resources

Usually, resources can be translated from their own interface by accessing Bookings > Resources. Note that when creating a new resource translation, all the contents of the existing resource will be copied into this new translation as shown below:

Once the resource translations are complete and when translating a bookable product into another language, Polylang will fill the resource field with the correct translation as below. This is what we call a smart copy. In the example below, it has pre-filled 「My Resource – French」 which is the translation of the resource 「My Resource – English」.

The label is copied and you can modify it. It is not synchronized.
When you create a new bookable product translation, if the resource translation does not exist yet, it is automatically created, by duplicating the original resource..
Example of translated resource automatically created
Let』s say that I have a product available in English and French, the German translation has not been created yet. I decide to create another resource directly in the French product as below:

 
Now I decide to translate this product in German. The creation of this product in German will automatically generate a translation for this resource in German but also in English as shown here:

 
And the synchronization function will add this new translation to the English product as here:

If you decide to add, remove, or select another resource from one of your translated products, this change will impact all translations.

Availability and Cost tab

All data on these 2 tabs are copied and synchronized across the translations, even the custom availability range and the additional cost. As explained in the introduction of the documentation, if you modify a value, add or delete a range of rules, the same will apply to other translations.

Persons tab

Data such as minimum and maximum number of people, multiple costs per person, count persons as bookings and activation of person type are copied and synchronized. It』s the same for the base cost and the block cost. As for the resources label, the name and description of the person type are copied only. This allows you to have a different value on the booking form through your translations. If you add or remove a person type, this change will impact the translations.

2. Synchronization between the bookings
With Polylang for WooCommerce, when you book a translated product in one language, it also books this product in all other languages. So when you view a product or its translations, they all appear unavailable. It works the same way with partial bookings.
Let』s say that I have a bookable product available in English and French. This product has 10 places available. 4 places have already been booked in English. Although I try to book 10 more places, there are now only 6 bookable seats in English and French as indicated below:

3. Emails are sent in the booked product language
The language of the booking is expected to be the current language of the visitor when he booked the product. The bookings are assigned to this language as shown below, allowing emails sent to the customer to be in this language.

Like WooCommerce emails, the subject and heading of the WooCommerce Bookings emails are translatable in the Strings Translations table (Languages> Strings translations) under the 『WooCommerce』 group as here:

If this is the first time you have used the Strings translations panel, we recommend that you read the relevant documentation before you start translating WooCommerce Bookings emails.
4. Translating WooCommerce Bookings endpoints
The translation of the endpoints are handled by Polylang Pro. Their translations is made in the Strings Translations option under the URL slug group as explained there.