Translating User Tours in WPLMS

In WPLMS version 2.8 we’ve added a new feature called User Tours. This is user guided tours or walkthroughs to guide your users step by step through the entire process.

 

 

In this tutorial we’ll learn how to translate user tours.

Step 1 : Download Tours file

Download the tours.json file. Refer Download tours.json (extract the zip and locate tours.json inside the extracted files)

It is the same file located in your setup at yoursite.com/wp-content/plugins/vibe-course-module/includes/js/tours.json

Tip :  Use the file in your setup for latest tours.json file

Step 2 : Translate the file

Open the file in any text editor and you’ll find code inside it. No need to worry, you do not need to make any changes in the code.

Locate the Title and Content  part in the code and you’ll find strings which you need to translate. Note the “double quotes” at the start and the at the end of the strings.

 

This is the title and content of every step respectively.

 

===

Example translation :

Step 3 : Upload the file

Although you can upload the file any where, where ever you can access it via browser url. Since it is a .json file you can not upload it in WordPress media uploader directly.

Instead you can follow this little trick.

  1. Create a folder in your desktop : tours
  2. Inside this folder paste the translated tours.json file
  3. Create another text file inside the tours folder index.txt and rename it to index.html. You can also copy the index.html file from Step 1 : Download tours.json link, inside the .zip download.
  4. Now zip the tours folder and you’ll get a tours.zip file.
  5. Now open any post or unit or course in WP Admin area. And use the “Upload Zip” button to upload the tours.zip. (screenshot)
  6. Embed the iframe code in the content and copy the iframe source link. (screenshot) and rename index.html to tours.json
  7. To confirm, paste the link in the browser : http://yoursite.com/../…/tours.json and it should open your translated version of the tours file.

 

Step 4 : Load the new tours.json file

Now the last step, we need to load the new tours.json file. Add this code in your child theme – functions.php or in WPLMS Customzier – wplms-customizer.php

replace : http://YOURSITE/wp-content/uploads/package_uploads/tours/tours.json with the path of your tours.json which we opened in the browser to confirm the file.

 

 

Step 5 : Done.

The new translations would now apply.

Was this article helpful?

Related Articles

14 Comments

  1. Gustavo

    Many thanks Mr Vibe! That seems very promising. I will give a try later on.
    So, we would be able with Tours guide / walkthrough potential (not logged) students on how to take a free course and register on the website? 🙂

  2. nena14

    Step 3.5 doesn’t work for me. Have follow the steps and chosen the tours.zip-file, but get the message “choose a .zip-file” .

    1. Most likely you did not add the index.html file in the zip package which prevented its upload.

    1. Thanks, please make sure that there is an index.html file along with tours.json file in the zip pack, that way it can bypass the upload zip check.

  3. EmanuelGT

    How about multiple languages using WPML ?
    Also what if I want to add additional steps to the tour, or modify the timing on them?

      1. EmanuelGT

        That’s great, please let us know when the filter for wpml is ready!! 🙂

Leave A Comment?