10.12. Command-line interfaces (CLI)

Command-line interfaces (CLI) allow advanced users to interact with Mahara through the command line or terminal rather than through a graphical interface. That can speed up certain actions or make them easier to execute.

10.12.1. new in Mahara 17.04 Install and update language packs

Typically, if you want to update a language pack, you need to download the entire language pack manually and place it into the appropriate folder. This is cumbersome, especially when you want to update the language packs during minor point updates.

Using CLI, you can speed up the process.

Install or update language packs for your instance of Mahara by listing the language codes.

Example (de = German, fr = French):

sudo -u www-data php admin/cli/sync_langpacks.php -l=de,fr

This will make a backup of the existing languages if they exist into the dataroot’s langpacks_backup directory.

Note

The language codes that are used are the official international ones used for the Mahara language packs.

Don’t make backups: Add the -b=false flag

Example:

sudo -u www-data php admin/cli/sync_langpacks.php -l=de,fr -b=false

Restore a backup: Use the -r=true flag

Example:

sudo -u www-data php admin/cli/sync_langpacks.php -l=de,fr -r=true

This will ignore trying to update the English language as that is set within Mahara itself.