If you want multilingual forms, you have 3 options
- Make the labels bilingual
- Make a tracker per language
- Have the labels be translated (which is what is described below)
Trackers can handle multilingual labels
- The labels should be in English and you add the translations to lang/xx/language.php
- It works for drop-down menus as well.
- Some field types can be identified as multilingual (to gather multilingual content)
We want to create a Tracker that can support English and French users. We want our tracker to be translated in both languages and we want to make sure that all data is consolidated into the same tracker. In other words we don't want to have to create an English and French tracker.
In the following example, we will show you how to create a multilingual tracker. Lets see how we would create a multilingual Drop Down list inside of a Tracker where the user is required to select from a list of Continents.
Step 1: Create your tracker and create a new Field of Type (Drop Down
Step 2: Translate your Tracker Field and Drop Down Items.
In the example we are creating, we have the following items to translate.
|Which Continent Do You Live In?||Dans quel continent habitez-vous ?|
Drop Down List
|North America||Amérique du Nord|
|South America||Amérique du Sud|
Step 3: Move your translation to the proper Custom.php file
Go where you Tiki is installed and insert a file named "custom.php" inside the proper language folder.
Simply go to: (tiki_is_installed)/lang/(your_translated_language)/custom.php
Here is the sample code for our example
<?php $lang_custom = array( "Which Continent Do You Live In?"=>"Dans quel continent habitez-vous ?", "Africa"=>"Afrique", "Asia"=>"Asie", "Australasia"=>"Australasie", "Antarctica"=>"Antarctique", "Europe"=>"Europe", "North America"=>"Amérique du Nord", "South America"=>"Amérique du Sud", ); $lang = $lang + $lang_custom;
Step 4: Congrats! You now have a multilingual tracker