Differences

This shows you the differences between two versions of the page.

Link to this comparison view

multilingual [2013/04/03 09:08] (current)
admin created
Line 1: Line 1:
 +====== Multilingual Tours ======
  
 +Tour My App supports multilingual tours, so you can display your tour in many different languages. Tour My App uses a very simple system through which you can add multilingual support with minimal overhead.
 +
 +There are two steps to getting a multilingual tour running:
 +
 +  - Create a tour and add translations in one or more languages
 +  - During integration, tell Tour My App which language should be used in displaying the tour
 +
 +===== Create a tour and add translations =====
 +
 +First, create a tour in the tour builder as usual. The text you enter while creating the tour is considered the "default" language. If you do not add translations, or you ask for a language for which you have not yet added a translation, then this is the text that is shown by default.
 +
 +Next, from the home page, go into the Translations section for your tour. In this page, you can add translations for each of your tour steps. Enter a "language code" (usually two letter code) to identify the translation and then enter the translations below. You can add as many different languages as you want.
 +
 +Translations are associated with the step, so you do not need to change the translations if you reorder the steps, or delete a step in the middle.
 +
 +<WRAP important>
 +Although you do not need change translations if you reorder the steps, don't forget to change the translations if you edit the text or add a translation for new steps.
 +</WRAP>
 +
 +===== Tell Tour My App which language to use =====
 +
 +Once you've created the tour and added the translations, then you'll need to tell Tour My App which language is to be shown to the user. This is done in the integration by adding the following line just before ''tour.start()'' in your integration:
 +
 +    tour.setOptions({"lang": "<your language code>"});
 +
 +This line tells Tour My App which language is to be used when running the tour. Usually, you will pick up the language code from the user's preferences or settings and pass it over to Tour My App.
 +
 +<WRAP tip>
 +When creating the translations, choose the language code to match with the language codes you use internally in your application. That way, you can just pass the same code over to Tour My App without having to do any additional processing.
 +</WRAP>