Developer Area/Language Packs/GUI Translation Interface

From Mahara Wiki

< Developer Area‎ | Language Packs
Revision as of 17:56, 9 May 2011 by Brettwilkins (talk | contribs) (Created page with "''"David's interface makes the translation work really smooth and easy."''<br />[ Koen Foggemans], at translation […")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

"David's interface makes the translation work really smooth and easy."
Koen Foggemans, at translation forum

There is a customized tree of Mahara intended for translators called patch-adminlang.git. The tool has been developed by David Mudrak. It adds some code allowing you to translate Mahara through the web interface. It is recommended to run a separate installation of Mahara from this repository. Do not install production servers from the repo. Once some more features is added into this separate tree and it is bug free, it may be merged into the standard tree of Mahara.

About the adminlang repository

The repo is hosted at git repository (see

Here is how David maintains the branches. Note that only Mahara's STABLE branches are tracked. David is too lazy to track the master branch and also he thinks that translators should never start translating before a beta or even RC1.

---o---o---o---o---o---o---o---o  git://
      o---o---o---o  git://
                o---o---o git://

How to translate Mahara using this repository

  1. Install Mahara from this repo on your PC or testing server. Follow the steps described at [System_Administrator's_Guide/Installing_Mahara] but use git clone git://
    instead of standard /mahara/mahara.git at Step 2.
  2. Switch to the branch that corresponds to the version of Mahara you plan to do the translation work on (probably the latest one). git checkout -b adminlang-1.3 origin/adminlang-1.3
  3. Create a directory 'langpacks/xx.utf' in your Mahara data directory. 'xx' stands for your language code. Make sure the directory is writeable by the web server process. The structure of the directories within 'maharadata/langpacks/xx.utf8' has to correspond to the structure of the language-related directories in htdocs. You may find more details on language pack structure here.
  4. Copy the file 'langconfig.php' from the Mahara 'htdocs/lang/en.utf8' to 'maharadata/langpacks/xx.utf8/lang/xx.utf8' directory and change the string 'thislanguage' to your language. $string['thislanguage'] = 'English';
    This variable will be used in the Language drop-down menu in Mahara Site Settings.
  5. Add the following configuration into your config.php and modify them as needed. $cfg->lang_author = 'Your Name ';
 $cfg->lang_copyright = '(C) 2006-2010 Catalyst IT Ltd';
All translated files in your package will have this information in the copyright header.
  1. Login as admin and go to Configure Site. Change Language to your new language.
  2. Go to Language card at Admin navigation. It opens admin/lang.php in the browser. Choose a file to edit. Add missing string or modify existing ones. Click on the existing string to edit it. There is no save button at the moment - every changed string is saved automatically on-the-fly by JSON AJAX request.