Skip to content

WooRewards

  1. Home
  2. Docs
  3. WooRewards
  4. Translations and WPML
  5. Multilingual website with WPML

Multilingual website with WPML

This documentation is for the WooRewards plugin

If you have a multilingual website, you probably use the WPML plugin. WooRewards is compatible with WPML and you can translate its content in the languages you need. The following documentation explains how to translate the core content of WooRewards and how to translate the texts you’ve set in the plugin settings.

Summary

Getting Started

 

Make sure that you have activated the WPML Multilingual CMS, WPML String Translation, WPML Translation Management, and WPML Media plugins by navigating to PluginsInstalled Plugins.

 

Translate the plugin’s hard coded sentences

 

WooRewards already supports several languages as French, Chinese, etc. But you can ask WPML to replace WordPress translations features if :

  • You want to support a new language
  • You want to override hard-coded sentences

 

Let WPML analyze the plugin

 

Instructions

Go in WPML → Theme and Plugin localization. Look for WooRewards, check it, then click on Scan selected plugins for strings. It can take several minutes.

 

 

Import existing translations

 

Instructions

Go to WPML → String translation. At bottom right, fill the form by selecting relevant .po files for your language with the right text-domain. WooRewards uses three text-domains:

  • lws-adminpanel : for administration screens only, find translation files in ./woorewards/assets/lws-adminpanel/languages/ directory.
  • woorewards-lite : for basic features in some front-ends and administration screens, find translation files in ./woorewards/languages/ directory.
  • woorewards-pro : for almost all sentences of the plugin, find translation files in ./woorewards/modules/woorewards-pro/languages/ directory.

Do not forget to check Also create translations according to the .po file. Else the process continues but nothing will be really imported.

 

Add your own translations

 

Instructions

Go to WPML → String translation.

You can take a look at all translatable strings of the plugin using text-domain filter on the following three values: lws-adminpanel, woorewards-lite, woorewards-pro.

Or you can search a specific sentence to replace. Copy the text in the Search for field, (check Include translations if you are not working in english), then click on Search button.

Finally, click translations on a line to open the text editor, set your translation, check it as complete and save.

During your translations, take care about placeholders. Some strings could contain words like %s, %1$s… that will be replaced when needed.

 

Translate your WooRewards input data

 

Loyalty Systems

 

Instructions

In WooRewards → Loyalty Systems, edit one of your systems. After saving your settings (title, points name, etc.), look at the bottom of the page for the WPML translation bloc.

Click on Send to translation. This will open the Translation Management screen.

 

Information

Note that you can go directly to WPML → Translation Management and filter with WooRewards Loyalty System value.

 

Instructions

On that screen, check the loyalty system row, choose the translation language and click on Add selected content to translation basket.

 

You should see the Translation Basket tab flash.

Open it and click on Send all items for translation.

 

 

Follow the link to the queue that appears.

 

 

Find the row with your loyalty system and click on Take and translate button.

 

 

Set your localised text, check Translation is complete boxes, then click on Save & Close button.

 

 

Translate Rewards and Earning Methods

 

When editing a Loyalty System, you can define several Rewards and Earning Points methods. WooRewards provides default generated strings for titles and other fields.

If you don’t override these strings and want to translate them, please see the chapter Add your own translation since they’re hard-coded strings (take care about placeholders, that strings usually contain words like %s, %1$s… that will be replaced when needed).

 

Instructions

If you’ve defined custom titles, descriptions, etc. and saved the Reward or Earning Points method item, you can go to WPML → Translation Management and filter with WooRewards Reward or WooRewards Points Earning Method value.

 

On that screen, check the relevant rows, choose the translation language and click on Add selected content to translation basket.

 

 

You should see the Translation Basket tab flash. Open it and click on Send all items for translation.

 

 

Follow the link to the queue that appears. Find the row with your Reward or Earning Point Method and click on Take and translate button.

 

 

Set your localised text, check Translation is complete boxes, then click on Save & Close button.

 

 

 

Translate Emails, Widgets and Shortcodes

TRANSLATE CUSTOM SENTENCES

In WooRewards → Settings, when you edit Widgets or Emails, some of them allow you to set custom texts. After saving your settings, you can find them back in WPML to provide translations for other languages.

Take care of your site default language and the language you currently display when editing settings, since it affects how WPML guesses the original language of that new custom text. Later, look at the flag near the String in the translation list to be sure.

Instructions

Go to WPML → String translation.

You can take a look at all translatable strings of the Widgets and Emails using domain filter on the following value: Widgets. Or you can search a specific sentence to replace. Copy the text in the Search for field, (check Include translations to be safe), then click on Search button.

 

 

Finally, click at translations on a line to open the text editor, set your translation, check it as complete and save.

 

 

 

Note that the flag in the String column indicates the original sentence language.

 

ABOUT EMAIL LOCALIZATION

The emails will be translated to the user prefered language (if user is known and he has defined one). WPML is asked to switch on that language by looking on receiver email address.

 

Information
For the special case of email to sponsored, since user is unknown yet, WooRewards assumes receiver speaks the same language as the sponsor.

 

Translate WooRewards Badges

 

Instructions

First, you have to have at least one WooRewards Badge. They can be found in Badges → All Badges.

 

 

After saving your Badge settings, at bottom right of a Badge edition screen, find the WPML box.

 

 

Then click on Send to translation button. The translation Dashboard opens with the Badge item in it.

 

Or you can go directly to WPML → Translation Management.

In the first tab Translation Dashboard, select WooRewards Badge in the type list and click on Filter.

 

 

Then, check the lines you want to write a translation for.

 

 

Finally, check Translate for the language you want and click on the Add button.

 

 

Continue on the Translation Basket tab that lists all previously selected strings. You only have to click on Send all items for translation button and wait for the process to end. Follow the link that appears to the Translation Queue.

In the table, find the job you just added and click on Take and translate.

 

 

In that last screen, you can edit all Badge sentences at once and click on Save & Close.

 

 

ALTERNATIVE

 

Instructions

Go in WPML → String translation. Filter Badge relative sentences with the domain. WPML create a new domain for each badge. It starts with woorewards-badge-. Click on Search.

 

 

Then, click at translations button on a line to open the text editor, set your translation, check it as complete and save.

Scroll To Top