Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Translating plugins: Difference between revisions

From MoodleDocs
(Added ** If your Moodle site will serve kids, consider [https://docs.moodle.org/31/en/Language_packs#Can_I_make_a_language_pack_for_kids.3F making a language pack for kids].)
(Added translation priority ** For K-12 teaching and learning environments)
Line 29: Line 29:
** All plugins with ''mobile'' in their name, related to [https://docs.moodle.org/31/en/Moodle_Mobile mobile devices].
** All plugins with ''mobile'' in their name, related to [https://docs.moodle.org/31/en/Moodle_Mobile mobile devices].
** [https://moodle.org/plugins/local_moodlecloudsignup MoodleCloud strings] are used for accessing the [https://moodle.com/cloud/ MoodleCloud] free and paid hosting services.
** [https://moodle.org/plugins/local_moodlecloudsignup MoodleCloud strings] are used for accessing the [https://moodle.com/cloud/ MoodleCloud] free and paid hosting services.
** For K-12 teaching and learning environments, consider the plugins that are included in the [https://moodle.com/cloud/school/?utm_source=Sendy&utm_medium=Email&utm_campaign=Newsletter_July2016 Moodle for School at MoodleCloud]:
*** [https://moodle.org/plugins/mod_attendance Attendance]
*** [http://bigbluebutton.org/ BigBlueButton]
*** [https://moodle.org/plugins/mod_checklist Checklist]
*** [https://moodle.org/plugins/atto_chemistry Chemistry editor]
*** [https://moodle.org/plugins/mod_choicegroup Group choice]
*** [https://moodle.org/plugins/block_xp Level up!]
*** [https://moodle.org/plugins/mod_quizgame Quizventure]
*** [https://moodle.org/plugins/tinymce_wordcount Word count]
** For universities, there is a [https://docs.moodle.org/31/en/Tertiary_education#Moodle_plugins_by.2Ffor_Universities list of plugins by/for Universities], and a [https://docs.moodle.org/31/en/Tertiary_education#Discipline-specific_plugins link to discipline-specific plugins], which might be worth translating.
** For universities, there is a [https://docs.moodle.org/31/en/Tertiary_education#Moodle_plugins_by.2Ffor_Universities list of plugins by/for Universities], and a [https://docs.moodle.org/31/en/Tertiary_education#Discipline-specific_plugins link to discipline-specific plugins], which might be worth translating.
** If your Moodle site will serve kids, consider [https://docs.moodle.org/31/en/Language_packs#Can_I_make_a_language_pack_for_kids.3F making a language pack for kids].
** If your Moodle site will serve kids, consider [https://docs.moodle.org/31/en/Language_packs#Can_I_make_a_language_pack_for_kids.3F making a language pack for kids].

Revision as of 17:19, 29 July 2016

Looking for translated plugins in the Moodle plugins database

  • Almost all contributed plugins published in Moodle Plugins directory have been imported into AMOS and are ready to be translated.
  • When a user is looking at the Moodle plugins database, in ' Description tab > Useful links section' there is a link to 'Contribute translation for (your preferred language)' that points to AMOS.
  • Have a look at an example for the very popular HotPot plugin:

Link to Plugin translations in Moodle plugins database.png

  • You can click on the 'Contribute translation for (your preferred language)' link.
  • CURRENTLY: If you do not have an account in AMOS, you would have to 'Create a new account' by using the appropriate link.
  • If you have a translator account at AMOS, you can use AMOS to contribute a translation.
  • 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

  • In the above example, there are a total of 123 different language packs registered in AMOS; 63 of these are missing a translation for HotPot, which means that there are 60 different language translations already available for the HotPot plugin, a fair number for this popular plugin :)
  • 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.

Plugin translation priority

Non-translatable strings

While AMOS does a great job for translating the Moodle core and most Moodle plugin language strings, some English language strings are (as of February 2015) not yet available for translation with AMOS.

Plugins in the Other category

The plugins classified as 'Other ' (Utilities, Experimental or Incubating) 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 containing 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.

Plugins with coding errors

Some plugins (of types different from 'Other') available for download in the Moodle plugins directory may not have English language strings available for translation in AMOS because of coding errors, that must be identified and fixed by the plugin maintainer:

  • The plugin code must not rely on trailing and leading whitespace in strings.
  • The string file must be considered as pure data file with the syntax $string['id'] = 'value';
  • No other PHP syntax such as concatenation, heredoc and nowdoc is supported by the tools that AMOS use when processing the strings (even if it may work in Moodle itself).
  • Use neither string concatenation operators nor other PHP logic inside string files. Those should really be considered as plain data files with simple $string['key'] = 'value'; syntax, nothing more.

Plugins with hard-wired English language strings

Sometimes you might have translated 100% of the strings available in AMOS for a given plugin, and you can still view the original English (non-translated) strings.

  • Please check that you have purged your browser cache and the server cache, waited for one hour (for AMOS to update the language packs), and updated your language packs.
  • If the problem persists, please write the plugin maintainer by clicking at the 'Bug tracker' link shown in the given plugin's page in the Moodle plugins database.
  • Most Moodle plugin authors have been very fast at replacing the English hard-coded strings with strings variables that can now be translated in AMOS.
  • If you suspect the problem is in a core plugin, you can post an issue in the AMOS translation forum.

Log descriptions can not be translated

Items that must NOT be translated

If translations are available in AMOS for some Moodle branches but not available for other branches

Sometimes a plugin may have its English language strings available for translations for some Moodle branches (e.g. 2.0 to 2.4), but not for other branches (e.g. 2.5 to 2.7), even though the plugin itself is indeed available for download for all branches (2.0 to 2.7) in the Moodle plugins database.

Please see an example in this post. The cause is very likely a programming error (see 'Plugins with coding errors' above), that must be fixed by the plugin maintainer.

What happens if a plugin ZIP file includes translation(s) inside the lang folder

If a site has debugging on, there will be a warning message about 'Found language file' when the user installs the plugin, but the installation may proceed.

Found language file debugging message.jpg

See also