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

Language packs: Difference between revisions

From MoodleDocs
(Added ==Why do some languages have several different language packs available?==)
(Re-organized ==Why do some languages have several different language packs available?==)
Line 92: Line 92:


==Why do some languages have several different language packs available?==
==Why do some languages have several different language packs available?==
* English language packs: See [https://docs.moodle.org/dev/Translation_FAQ#Are_there_translations_for_the_American_.28and_other_branches_of_the.29_English_language.3F Are there translations for the American (and other branches of the) English language?] in the developer's documentation.
See [https://docs.moodle.org/dev/Translation_FAQ#Moodle_languages_with_several_available_language_packs the developer's documentation] about this.
 
* Spanish language packs: Spain and many South American countries use a decimal comma, while Mexico and many Central American countries use a decimal point. See [https://docs.moodle.org/dev/Decimal_separator?redirect=no Decimal separator]] in the developer's documentation.
 
* German language packs: (explanation by a German language pack maintainer)
** In Germany we have a formal language where people are talking with „Sie“ to each other. This is the language of the formal adults. I think it’s something like using „Sir“ in english language. The normal German language pack is using this formal language. Nearly all strings in the Moodle language pack and in the translated plugins are translated in the formal language.
 
** You can’t use these formal words in school … there you are using an informal language with „du“. Students are talking to each other like friends. Therefor we made the language pack „German personal“ (de_du). It come with the personal words „du“, „dein“, „dir“ and so on where the formal words are „Sie“, „Ihre“, „Ihnen“ (yes, these words are written with an uppercase letter).
 
** For my (Ralf Krause) personal use I take „German personal" (de_du) or „German Kids“ (de_kids). „German Kids“ uses the personal words „du“, „dein“ and „dir“ but it also uses an easier to understand language.
 
** Some time ago we tried to make Moodle as a platform for social communication but nobody wanted to use it. Therefore we made "German community“. In a social platform, nobody would talk about teachers or students or participants or classrooms or courses … in a social platform, you would use members of a group and meetings. I don’t know if this pack will be used in future.
   
   
==See also==
==See also==

Revision as of 14:57, 29 July 2016

Language pack installation and uninstallation

Over 100 language packs are available for an administrator to install on your Moodle site via Administration > Site administration > Language > Language packs. 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.

Language packs are a work-in-progress, since new language strings are added for new features in each new version of Moodle. Language packs for Moodle 3.1 lists the percentage of language strings translated in each language pack.


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

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:

  • ca_valencià (which requires ca)
  • de_du, de_kids and de_comm (which require de)
  • en_us, en_ar, en_kids (which require the default en)
  • es_ve (which requires es)
  • fil (which requires fi)
  • fr_ca (which requires fr)
  • he_kids (which requires he)
  • ja_kids (which requires ja)
  • lt_uni (which requires lt)
  • no_gr (which requires no)
  • sv_fi (which requires sv)
  • wo (which requires fr)

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.1 and unzipping it to a directory called lang in your moodledata directory.

Language pack updates

  • Language packs can be updated via Administration > Site administration > Language > Language packs.
  • You can see which language packs have updates because they are listed in both 'Installed language packs' and 'Available language packs'.
  • To update all installed language packs (except English and any local language packs) click the 'Update all installed language packs' button.
  • For sites with a large number of language packs installed, to update just a few installed language packs at a time, select the languages from the 'Available language packs' list and click the 'Install selected language pack(s)' button.
  • The English language pack is updated automatically each time the site is upgraded.
  • As most language packs are a work in progress, it is a good idea to update them regularly.

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

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

Can I personalize language strings per theme?

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

Changing the look of a course

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

Changing the behaviour of a course

  • If you do not want a student to see any reference to grades when he/she finishes a lesson, by editing the correct text string, it is possible to replace "Your score is 9 (out of 10)" with "Be sure to get your certificate". Or change "Congratulations - end of lesson reached" to "We hoped this lesson helped you". See how to change the end of lesson page display.
  • You can have several different courses, each using a different (child) language pack and each one showing personalized language strings.
  • See this forum post for detailed instructions on how to create your new child languages.

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?

  • Yes.
  • The current existing language packs for kids are:
    • de_kids (which require de)
    • en_kids (which require the default en)
    • he_kids (which requires he)
    • ja_kids (which requires ja)
  • If you want to make a language pack for kids in a language different from the ones listed above, use the following method:
    • Install the (en_kids) English for kids language pack in your local Moodle server
    • You will have to edit 10 files (which are stored in the moodledata/lang/en_kids folder).
    • You can use Notepad++] or any other text editor, but avoid using MS Word or MS Notepad.
  • Start with langconfig.php and choose your main language as the parentlanguage
  • When you have finished translating all the strings, you can go to AMOS and request a new language pack to the person administering all Moodle language packs.
  • Upload into AMOS the 10 files in your moodledata/lang/en_kids folder
  • Remember to keep updating and expanding your new language pack

Why do some languages have several different language packs available?

See the developer's documentation about this.

See also