Actions

Difference between revisions of "Developer Area/Language Packs/GUI Translation Interface"

From Mahara Wiki

< Developer Area‎ | Language Packs
(How to translate Mahara using this repository)
(added tracker link)
Line 30: Line 30:
  
 
This file does not contain language strings per se, it contains language configuration that reflects name of the language, date/time formats, plural forms, etc. Since 1.5 due to some plural form features, you can't edit this file through adminlang interface, please modify it manually according to your requirements.
 
This file does not contain language strings per se, it contains language configuration that reflects name of the language, date/time formats, plural forms, etc. Since 1.5 due to some plural form features, you can't edit this file through adminlang interface, please modify it manually according to your requirements.
 +
 +
== Bugs reporting and feature proposals ==
 +
 +
If you found a bug or would like to suggest a feature, please report it [https://bugs.launchpad.net/mahara-adminlang in the tracker].

Revision as of 00:06, 21 November 2012

"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 this 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 http://gitorious.org/mahara-contrib/patch-adminlang).

Here is how branches are maintained. Note that only Mahara's STABLE branches are tracked.

                         o---o---o git://gitorious.org/mahara-contrib/patch-adminlang.git#adminlang-master
                        /
---o---o---o---o---o---o---o---o  git://gitorious.org/mahara/mahara.git#master
     \
      o---o---o---o  git://gitorious.org/mahara/mahara.git#1.X_STABLE
               \
                o---o---o git://gitorious.org/mahara-contrib/patch-adminlang.git#adminlang-1.X

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://gitorious.org/mahara-contrib/patch-adminlang.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.5 origin/adminlang-1.5
  3. Create a directory 'langpacks/xx.utf8' 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, change the string 'thislanguage' to your language, and the string 'locales' to your 'xx.utf8'.
    $string['thislanguage'] = 'English';
    $string['locales'] = 'en_US.utf8,en_GB.utf8,en,english-us,english-uk,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 http://catalyst.net.nz';
    All translated files in your package will have this information in the copyright header.
  6. Login as admin and go to Configure Site. Change Language to your new language.
  7. 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.

Note about langconfig.php

This file does not contain language strings per se, it contains language configuration that reflects name of the language, date/time formats, plural forms, etc. Since 1.5 due to some plural form features, you can't edit this file through adminlang interface, please modify it manually according to your requirements.

Bugs reporting and feature proposals

If you found a bug or would like to suggest a feature, please report it in the tracker.