It’s here, QSM x WPML. After a long wait and thorough internal testing, we are happy to inform you that QSM has finally been configured to be integrated with WPML.
What this means, is that you can now display your quizzes and surveys in multiple languages so as to engage the international audience and get them through the quiz/survey.
This document explains how to configure the WPML plugin for smooth functioning with QSM.
Install & Configure WPML and WPML String Translation
Step 1: Be on the Latest Version of the Quiz and Survey Master plugin. Check for plugin updates, if you find product updates in the plugins section make sure to update them.
Step 2: We need to Install & Configure WPML if you haven’t already, follow the below-mentioned steps
a) To install WPML, login into your WPML Account and go to the Downloads page to download the OTGS installer plugin
b) Upload and activate the OTGS installer plugin
c) After installation, click on the Register WPML link and then “Get a key for this site”. This will take you to your WPML account
d) Generate a key and copy-paste it back to your site.
e) After registering, you can see a list of all available WPML plugins for you to download and activate, you can download and activate any WPML component from the list, we would need the String Translation plugin, so go ahead and download it too.
f) After WPML installation & activation you now need to configure it, for that click on the Configure WPML button on the admin notice that can be found on the top of the screen.
g) A setup wizard opens up with various configuration tabs.
h) Selecting Languages, select all the languages that you want to translate your site into
i) WPML offers various translations options, you can choose how you’d want to translate your site. You can go with automatic translation, local translators, translate yourself or use a translation service.
Step 3: Depending on the languages installed on your website and the default language set (English in this case), you now need to check the Editing Language checkbox in the WPML Language Settings.
To do so, navigate to Users -> Profile -> WPML Language Settings -> Editing Languages. Check the option -> Set admin language as editing language.
Create a Quiz with Questions & Answers
Navigate to QSM > Quizzes & Surveys > Add New to create a new quiz. You need to perform the same steps you follow while creating a normal quiz. Here’s a doc that explains quiz creation in QSM.
We will be creating a sample quiz for explaining the WPML Integration. Once inside QSM, Click on Add New > Select a Theme > Add a Quiz Name.
Add Questions, Answers, Hints, Correct Answer Info, Hints, etc. in the Questions Tab.
You can collect user contact info from the Contact Tab, by adding fields like Name, Email, Business, etc.
You can add custom messages in the Text Tab & also change button labels. Don’t forget to hit the “Save Changes” button in the text tab after changing the button labels.
Enable the required options in the options tab, we’ll be going with the default settings for this demo.
Next, in the Emails tab, you can configure the mails to be sent to the user & admin after taking the quiz. We’ll be keeping it on its default settings.
Now in the Results tab, configure what you’d want to display on the results page. Again, we’ll be keeping the default values on the results page too.
After creating a quiz, one thing to note is the Quiz Id, which can be found in the address bar as seen above.
Translating Quiz Items in WPML String Translation
To start translating the quiz items navigate to WPML > String Translation. Here, by default, you will be shown the “All domains” strings list.
QSM has 4 Special Domains namely
- QSM Defaults
- QSM Questions
- QSM Answers
- QSM Meta
QSM Defaults – It consists of all the default Text Tab items like all the Messages and Custom Labels that can be used as a fallback translation if specific strings are not being translated in QSM Meta.
QSM Questions – It consists of all the quiz questions associated with the Question ID
QSM Answers – It consists of all the quiz answers. Answers have a unique name associated with the string that gets created automatically to differentiate each answer.
QSM Meta – It consists of all the strings associated with the quiz like the Contact Fields, Hints, Validation Messages, Quiz Emails, Results Pages Info, Button Texts, etc.
Translating QSM Defaults
The name column showcases the unique ids of each string besides the type of string on the String column.
To translate all the strings of the QSM Text tab you need to select the QSM Defaults domain in the domains dropdown of String Translation.
Here you will find all the text options that get created with the Quiz. To translate the individual options click on the plus (+) icon on the language column and enter the translation of the specific language.
Translating QSM Questions
Quiz Questions Translations have been associated with the Question ID. Question ID appears on the top-right inside each QSM question, each question has a unique Question ID in QSM and hence it makes them differentiate from the rest.
Now, to translate the individual question, click on the plus (+) icon in the language columns and add the specific language translations.
One thing to note here is both the Question Title and Question Description can be found and translated from the QSM Questions domain.
Also, if you want to translate an already existing quiz then just click on the Save button on each QSM Tabs inside QSM and the data will get updated in the String Translation QSM Domains.
Translating QSM Answers
Quiz Answers can be translated from the QSM Answers domain. Each answer is associated with a unique text string that is generated using the answer text.
Click on the plus (+) icon on the language translation column to edit and add individual string translations.
So, for example, if you have three common answers like “Yes“, “No” and “Maybe” in all your quizzes then you just need to translate the answer string once and the fallback will automatically happen in all the quizzes where these three answers have been used.
Translating QSM Meta
To translate all the strings associated with the quiz like the Contact Fields, Hints, Validation Messages, Quiz Emails, Results Pages Info, Button Texts, and all the miscellaneous data select the domain as QSM meta.
In this list, you can translate individual string data by clicking on the plus (+) icon of the specific language column.
Note: The main difference between the meta and defaults domain is that if a particular string is translated in the meta domain for a particular quiz then the translation would appear in the front end. And, if a particular string isn’t translated in the meta domain whereas been already translated in the default domain then there would be a fallback and the default translation would be displayed in the frontend.
In the admin results page, You might notice that even if you translated all the strings, not all things get translated to the new language on the results page that’s because of the default site language set in the WPML Language Settings.