Skip to main content
All CollectionsDiscount Rules for WooCommerceTranslation
How to translate strings using LOCO Translate
How to translate strings using LOCO Translate

This quick guide will teach you how to translate strings in the Discount Rules for WooCommerce plugin by using the plugin Loco Translate.

Ramesh avatar
Written by Ramesh
Updated over 9 months ago

What is Loco Translate?

Loco Translate is an awesome translation editor plugin, which is Free and has more than one million active installs. You can translate both WordPress themes or plugins into any other language other than the one it originally comes in (which is typically English).

Why Loco Translate ?

  • It has a built-in translation editor.

  • Simple way to translate theme/plugin files directly from WordPress Dashboard.

Some example strings that we are going to translate in this doc are:

  • “Title” from discount table

  • Discount

  • Free

  • Discount bar

The Discount Table is a part of our free feature. Therefore, if you want to translate the string "Title" from the discount table, you can choose our free pack called "Discount Rules" and attempt to translate the string.

On the other hand, strings such as "Discount" and "Free" are included in our PRO feature. To translate these strings, you will need to select our PRO pack called "Discount Rules PRO 2.0" and translate the strings accordingly.

Let's get started,

Make sure you have already installed and activated the Discount Rules for Woocommerce plugin. Haven't yet purchased the Discount Rules for WooCommerce - PRO ?

Step 1: Installation and Activation of Loco Translate

  • Please go to your WordPress dashboard -> Plugins -> Add New

  • Search for "loco translate"

  • You will see the LOCO TRANSLATE plugin in the result. Click on Install now and activate the plugin.

Now that the LOCO Translate plugin is installed, let's start using it.

Step 2: Language Setup

(Only required if you don't see the language that you are going to translate strings to display in the Loco translate . If you see your language, you can skip this step)

  • Go Loco Translate --> Plugins --> search for the plugin “Discount Rules PRO 2.0”

  • To begin translating strings, you need to choose between "Discount Rules" and "Discount Rules PRO 2.0" based on the specific string you want to translate. After selecting the appropriate pack, click on "New language."

  • Next, select the language you want to translate the strings into and choose the location as "System" as shown in the below screenshot.

  • Finally, click on "Start Translating" to initiate the translation process.

In the next screen, there will be a list of texts/ strings available for translation. Choose the text you wanted to translate.

Step 3: Translating the example strings one by one:

Example 1: “Title” from discount table

Screenshot showing the string “Title” :

To translate the string:

  • Go to Loco Translate -> Plugins -> choose "Discount Rules" (since the discount table is available in the free version, select the free pack).

  • Click on the "Edit" option.

  • In the search bar, enter the string "Title" to locate it.

  • Translate the original string with the translated version.

  • Click on the "Save" button to save the translated string.

A detailed screenshot illustrating the translation process:

Below screenshot confirms that the string “Title” has been translated correctly:

Example 2 : Discount

Screenshot showing the string “Discount” :

To translate the string:

  • Go to Loco Translate -> Plugins and select "Discount Rules PRO 2.0" since it is a PRO feature.

  • Click on the "Edit" option.

  • In the search bar, type in the string "Discount" to locate it.

  • Enter the translated version of the string.

  • Save the translated string by clicking on the "Save" button.

A detailed screenshot illustrating the translation process:

Below screenshot confirms that the string “Discount” has been translated correctly:

Example 3: Free

Screenshot showing the string “Free” :

To translate the string:

  • Go to Loco Translate -> Plugins and select "Discount Rules PRO 2.0" since it is a PRO feature.

  • Click on the "Edit" option.

  • In the search bar, type in the string "Free" to locate it.

  • Enter the translated version of the string.

  • Save the translated string by clicking on the "Save" button.

A detailed screenshot illustrating the translation process:

Below screenshot confirms that the string “Free” has been translated correctly:

Example 4: Discount bar

Dynamic strings such as "discount bar," "rule title," and "discount label" are not included in the translation table of LocoTranslate by default since they are added dynamically by users. To translate these dynamic strings, you need to follow a specific process.

First, you must add these dynamic strings to the .pot file by using the "Edit Template" option. Then, you can search for these strings in the plugin's .po file and proceed with the translation.

Let's take the example of translating the dynamic string "discount bar" to understand the process.

Screenshot showing the string from “Discount Bar” :

Step 1: Adding the strings to .pot file of Discount Rules:

  • Go to Loco Translate -> Plugins -> choose Discount Rules

  • Click on “Edit Template” option

  • Click on “Add” button and add the discount bar string “Get store wide 10% OFF” to the plugin .pot file and “Save” it as shown in the below screenshot.

Step 2: Translating the discount bar string “Get store wide 10% OFF”

  • Go to Loco Translate -> Plugins -> choose “Discount Rules”

  • Click on the "Edit" option and “Sync” the strings in .po file of Discount Rules.

  • Search for the string “Get store wide 10% OFF” in the search bar, enter the translated string

  • Click on the "Save" button to save the translated string as shown in the below screenshot.

Below screenshot confirms that the discount bar string has been translated correctly:

Similarly, we can apply the same method to translate all dynamic strings from the Discount Rules for WooCommerce plugin.

Haven't yet purchased the Discount Rules for WooCommerce - PRO ?

Note :

  • When using the Loco Translate plugin, it is important to select the second option, which is "System," in the location selection.

  • The translated texts will be visible based on the chosen site language.

Next Steps:

You may also want to check out these helpful guides:

Refer this video to know more about translating strings using Loco Translate:

Still unclear ?

If you need any assistance, please create a support request at our ticket system. We are always happy to assist you :)

Did this answer your question?