Note: You are currently viewing documentation for Moodle 2.5. Up-to-date documentation for the latest stable version of Moodle may be available here: Translation.

Translation

From MoodleDocs
Revision as of 02:06, 30 October 2013 by German Valero (talk | contribs) (added |200px and |300px in image Files to show smaller images)

So you'd like to help with translating Moodle?

Great! :-) Please check the list of language packs without maintainer. If your language is listed, and you'd like to volunteer to become language pack maintainer, email our translation coordinator, Koen, translation@moodle.org.

Otherwise, check the Translation credits and contact the maintainer of your language pack to ask where you can help. The name at the top of the list for each language is the current language pack maintainer. (If you don't receive a response within a reasonable time, email Koen translation@moodle.org.)

Getting started

The Moodle languages portal http://lang.moodle.org/ enables translators to work collaboratively on language packs and submit translations using a special Moodle translation tool called AMOS.

To help with translating Moodle

  1. Create an account on the portal, making sure you provide your full name (in order for you to receive credit for your translation work) and contact email.
  2. See the info Help for newcomers.
  3. Access the AMOS translation tool via the link in the navigation block and see the AMOS documentation.
  4. Check the langconfig file first, before translating other files.

If you have any questions, please enrol in the Translating Moodle course and join the discussions there.

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 curly 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.

Non-translatable strings

While AMOS does a great job for translating the Moodle core and most Moodle add-ons language strings, some English language strings are (as of July 2013) not yet available for translation with AMOS.

The plugins classified as 'Other ' are not translatable by AMOS (see this forum thread). You can use the Language customization tool within your Moodle (production or local) server to produce the .php file cointaining the translated language strings for your language and email this file to the particular 'other' plugin maintainer, so that it can be included in the lang folder within the downloadable Zip file for the plugin.

Translating the Moodle online Documentation (MoodleDocs)

MoodleDocs pages, such as the page you are reading right now, are wiki pages available in several languages. Any registered Moodle user can contribute to MoodleDocs and improve or translate these wiki pages. Please make sure to follow the guidelines for contributors.

Looking for translated add-ons in the Moodle plugins database

Link to Plugin translations in Moodle plugins database.png

  • You can click on the 'Translations' link.
  • If the user then selects all the language packs (except English fixes) and writes 'pluginname' in the box for 'String identifier', AMOS will display the name of the plugin in all available translations.
  • Make sure that you have selected the Moodle branch(es) that you are interested in (eg, 2.5 in the image below).

Plugins translations in AMOS.png

  • When no translation is available for any/many language(s), the box named 'Translation' will be empty for those languages.
  • If a plugin name has been translated, there is a fair chance (but no certainty) that this plugin has been (completely) translated into that language. You can change the settings in AMOS and check for yourself.
  • Please help Moodle users in other languages by translating your favorite plugins :)


See also