This space is archived

For current information please use the current ExamSys documentation

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Current »

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.

Creating a new Language Pack

New langauges can be added via CrowdIn.

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

When a developer adds a new string to Rogō via a pull request to the develop branch it is approved and merged.

Once merged the develop branch is built on the rogo auto test environment. Once All unit and behat tests have passed new strings are uploaded to Crowdin onto a develop branch of the language packs. Translators can now work on these new strings.

When a release branch is finalized in Bitbucket an upload of all new strings on the develop branch to the master branch in Crowdin is triggered.



  • No labels