Talk:Translation

Jump to: navigation, search

Note: You are currently viewing documentation for Moodle 3.1. Up-to-date documentation for the latest stable version of Moodle is probably available here: Translation.

The default language for Moodle is English which means that words and phrases you see as you move around a Moodle course are in English. However, these terms have been translated into over 100 languages and dialects and so you can use Moodle in your own mother tongue by installing the correct language pack. There are also several versions of the same language such as US English and Pirate English and Business German, so a translation doesn't have to be in a completely different language.

How you can help translate Moodle

Suggest and submit some translations

Perhaps you have seen an error (including in English) or a phrase in your language which hasn't yet been translated? Please see Help translate Moodle for how to improve the language packs.

Maintain a language pack

Perhaps your language or dialect hasn't been translated yet and you would like to translate it? Or you want to make a specialised language pack such as a young children's or commercial version? Or you want to take over a non-maintained language pack? Please see Language pack maintaining for how to do this.

How do language packs work?

A standard Moodle comes with an English language pack only. It is installed in moodledata/lang/en. Extra language packs are normally installed directly from within Moodle from Administration>Language>Language packs, but in some cases you might need to install them via FTP to your moodledata folder into the folder lang.

The English language terms (or 'strings') for the main (core) Moodle features such as administration, roles etc, are stored in lang/en. Language files relating to modules, blocks and add-ons are stored with the files of that particular module, block or add-on. So if you wanted to see the language strings for the badges block for example, you would look in blocks/badges/lang/en. If you wanted to see the language files for the workshop module, you would look in mod/workshop/lang/en


If you install another languge pack, you will then get a folder such as lang/fr which would have French translations of Moodle terms. Unlike with English, other language packs such as lang/fr will contain all translations along with the main core terms so you would find see for example the badges strings in lang/fr/block_badges.php and the workshop strings in lang/fr/workshop.php

These files (which all end in .php) contain short phrases, often called "strings". Strings may contain a placeholder (between the square brackets below) This placeholder is replaced with the chosen words from the language pack when the string is displayed. The term between the square brackets is called the 'string identifier' or the 'string name'. Examples:

$string['addnewcourse'] = 'Add a new course';
$string['hidesection'] = 'Hide section {$a}';

If a string hasn't been translated, then Moodle will use the parent language or the original English version. Thus, you might see a Moodle site where some terms have been translated into a language but others still display in English.