This project uses CrowdIn to manage language packs.
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
- The user can select a different language in the settings of their web browser.
- 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`:
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.
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.
See Translations [Community Developers] and /wiki/spaces/ROGO/pages/42631170 (if you are a core developer).