This space is archived

For current information please use the current ExamSys documentation

Languages

ROGO 6.3.0

This project uses CrowdIn to manage language packs.

Introduction

Rogō includes a language abstraction layer which makes it possible to translate user interface text without editing core code. The way this works is by using arrays which hold the strings (words) used. So for example instead of hard-coding 'OK' onto a button, instead the button uses the 'OK' element of the language array. When the array is switched to a different language the text the button uses will change.

Selecting a Language

  1. The user can select a different language in the settings of their web browser.
  2. A dropdown menu can be added to the log in screen of Rogō. To do this an additional line can be added to `$authentication = array(` in `/config/config.inc.php`:



array('languageselection'array('available_languages'=>array('English'=>'en','Polski'=>'pl','Čeština'=>'cs','Slováci'=>'sk'),'cfg_web_root'=>$cfg_web_root), 'Language Selection')

The important part is the 'available_languages' array which holds the name of the language (e.g. 'Polski') and its abbreviation (e.g. 'pl'). 
Lang.class.php script is used to read and parse language preferences sent by the web browser. Firstly it will take a five digit language, for example 'en-GB', and try to match this to a directory in /lang, for example: /lang/en-gb/. If it cannot find a direct match then it will take the first two characters and repeat the search, e.g. /lang/en/. It will do this in turn for all language preferences sent by the web browser. In the event of no matches because a language pack has not yet been developed in Rogō, the system will default to English.

Supported Languages

Language packs are maintained by the community at the Rogō CrowdIn project page.

Specific release language packs can be downloaded from http://rogo-oss.nottingham.ac.uk/langpacks.

Contributing to the Community

Please get in touch via CrowdIn if you would like to add another language or contribute translations to existing languages.

Development

See Translations [Community Developers] and /wiki/spaces/ROGO/pages/42631170 (if you are a core developer).