Programming, microcontrollers and photography




Overriding translations in elgg 1.8beta

03 Jun 2011
Posted by John

What to do if you are not happy with a certain translation or text in elgg? You can look up the texts in the elgg sources and change them, but that would mean you could not update freely. After update you would have to check your texts again. This very simple plugin puts your new texts in a plugin that you can load and unload whenever you like. It's an example you can change to your needs.

Because our intended audience uses the term Groups in a different context, In our webset the elgg termGroups will not fully clarify the contents of the thing. For our users Projects would be much better. Therefor, we'll create a plugin to change Group to Project. Users can become members of a project, instead of a group.
The plugin contains just 3 files:

  1. en.php - simple PHP code creating an array of texts and adding them to the elgg framework. The entries in the array will override the texts from /mod/groups/languages/en.php
  2. start.php - this is a required file for plugins. In this case it's empty
  3. manifest.xml - XML file containing decriptive data of the plugin

Installation conform normal elgg plugin installation. 

AttachmentSize
grouprename.zip3.7 KB


Powered by Drupal, an open source content management system