Language packs

Language


Contents


Language pack installation and uninstallation

Over 100 language packs are available for an administrator to install on your Moodle site in 'Language packs' in the Site administration. Simply select the languages you require from the list of available language packs and click on the "Install selected language pack" button.

Multiple language packs may be selected for install by holding down the Apple or Ctrl key whilst clicking on the language packs.

Installing many (20+) language packs has almost 0 impact on Moodle performance.

Multiple language packs may be uninstalled, once selected, by clicking the 'Uninstall selected language packs" button.


Language packs and manual download

Language packs are a work-in-progress, since new language strings are added for new features in each new version of Moodle. Lang packs can be manually downloaded from Language packs for Moodle 3.3. The page also lists the percentage of language strings translated in each language pack.


Parent language packs and child language packs

Certain language packs (a child language pack) contain only the modified language strings from their parent language, rather than a complete set. Thus, it is necessary to install the parent language pack too. These language packs are:

Note: If your site uses a child language pack (see the list above), if you use the Multi-language content filter, you need to be very careful about how to use if (as reported in MDL-55197). See Multi-language content filter for more details and examples.


Manual language pack installation

In general, the easiest way to install additional language packs is from within Moodle. However, it is also possible to install a language pack manually by downloading the zip file from Language packs for Moodle 3.3 and unzipping it to a directory called lang in your moodledata directory.


Language pack updates

All installed language packs are updated as a scheduled task. By default the task is run daily.


Language pack failure to update

(Failed to connect to 2400:cb00:2048:1::6814:ef: Network is unreachable)

$options['CURLOPT_IPRESOLVE'] = CURL_IPRESOLVE_V4;


Moodle can not connect to download.moodle.org

This can happen if:


Inside a language pack

A standard Moodle comes with an English language pack only. It is installed in moodledata/lang/en.

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 other plugins are stored with the files of that particular plugin. 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 language pack, we 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.


Can I personalize language strings per theme?

Not directly, but we can use new local (child) language packs to achieve different courses behaviours/looks


Changing the look of a course

We can have a course with a different theme 'and' a different child language pack. We will then have personalized language strings in the only course that uses that particular theme.


Changing the behaviour of a course


Can I install one particular language pack and supplement the missing translations using a second (related) language pack?


Can I make a language pack for kids?


Why do some languages have several different language packs available?

See the developer's documentation about this.


Why has my language pack suddenly forgotten some translations?

See the following image showing (Insignias) a properly translated Spanish language string (green rectangle) and an unstranslated English language string (red rectangle) for 'Badges' plus a mixture of translated and untranslated strings with a language pack that should have 100% of the core strings translated.

If you try to update your language packs we will get a message indicating 'Update of 'xxxx_old' language pack skipped.

Read the following section for the cause and the fix.


Why do I have a language pack named xx_old' that I never installed?

Sometimes you may find (see image below) that your server has, in addition to your usual language packs (eg, en, es_mx), an odd-named language pack with an _old name ending (eg, es_mx_old), that -obviously- can not be updated.


See also