Deepler is a local moodle plugin that provides a content translation page for courses and automatic machine translation using the ©Deepl Pro Translation api. It is developed for those who want to translate a course all on one page without having to navigate to each module and update translations. Translation workflow being the following:
Multi-Language Content (v2) is a dependency of this plugin and will not work without it.
This is a fork of Jamfire's https://github.com/jamfire/moodle-local_coursetranslator which was left deprecated with https://github.com/jamfire/moodle-filter_autotranslate for replacement. Though going the filter way is most probably the best way for auto translation, we found useful to improve this one adding the necessary "revision" step as Machine translation will never be 100% accurate specially in the context of knowledge transmission where accuracy is mandatory.
Clone or download this plugin to /moodlewww/local/deepler
and run through the database
upgrade process.
Course Translator will extend Moodle with the local/deepler:edittranslations
capability. Assign the capability to a new Translator role or add it to one of your
existing roles.
This plugin will add a local_deepler_update_translation
web service for the translation page to perform ajax requests against.
To configure the plugin, navigate to Site Administration -> Plugins -> Local plugins -> Manage local plugins. From this page you can configure ©Deepl settings, specify wether you are using ©Deepl API Free or ©Deepl API Pro, and enable/disable the autotranslate feature on the translation page. Visit the ©Deepl API page to signup for an api key that you can enter into local plugin settings.
Currently Deepl doesn't support any. See https://developers.deepl.com/docs/resources/supported-languages. The plugin gives you the possiblity to use these sub languages if your moodle install has them as if they were their parent language. This setting is ticked by default.
To begin translating content, visit a course, open the course settings action menu, and then go to Course Translator.
You will be sent to the translation page for the course.
There you can fine tune ©Deepl's commands.
The source language will be set to the actual Moodle language selection which will automatically be set to other. Changing the source language will act as if you'd change moodle's lang. It is important, from a translation standpoint, to select the source language from the language it was initially written (and to stick with it).
When first translating your content the plugin will insert {mlang other}Your Content...{mlang}
tags .
Please checkout the mlang docs to understand more.
nb: indeed you cannot select the same target language as the source and vice versa.
To change the language you want to translate to, choose a language from the Target language {mlang XX} dropdown. Note: indeed you cannot translate from and to the same language so buttons and checkboxes would be disabled if so.
Language that are not suppoted by ©Deepl are checked at each session so if your Moodle instance have unsupported languages, you will not be able to select it.
You can filter the rows to hide/show the ones that need to be translated as wished. Clicking on the "Status" checkbox will select all visible.
These filter show/hide the textual content found in the course.
These are the content that are already translated and that no change were made in the source.
They will appear with the GREEN DOT indicator.
These are the textual contents that were never translated or that were modified after being translated.
They appear with the RED DOT indicator when they were never translated.
They appear with the ORANGE DOT indicator when they were already translated but the source text change since.
Each row has a little colored dot to indicate a status:
It is not possible to edit the source content from this plugin's interface. Nevertheless, clicking on the PENCIL icon will jump you to the regular place for you to do so.
Clicking on the TRANSLATION icon will toggle the display of multilang tags and all available translations.
The plugin will try to fetch and display embeded images. When not found it will highlight the alt text in yellow and italicised as seen above.
Note* the following process when saving to the database
The original content has no MLANG tag and the source lang is the main:
{mlang other}SOURCE_CONTENT{mlang} {mlang target_lang}TRANSLATED_CONTENT{mlang}
The original content has no MLANG tag and the source lang is different from the main:
{mlang other}SOURCE_CONTENT{mlang} {mlang special_source_lang}SOURCE_CONTENT{mlang} {mlang target_lang}TRANSLATED_CONTENT{mlang}
The original content has already MLANG tag and the source lang is the main:
{mlang other}SOURCE_CONTENT{mlang} {mlang target_lang}TRANSLATED_CONTENT{mlang}
The original content has already MLANG tag and the source lang is different from the main and there were no {mlang other}:
{mlang other}SOURCE_CONTENT{mlang} {mlang special_source_lang}SOURCE_CONTENT{mlang} {mlang target_lang}TRANSLATED_CONTENT{mlang}
The original content has already MLANG tag and the source lang is different from the main and there were already a {mlang other:
{mlang other}ANOTHER_SOURCE{mlang} {mlang special_source_lang}SOURCE_CONTENT{mlang} {mlang target_lang}TRANSLATED_CONTENT{mlang}
Content's texts fields are displayed in the order of appearance of the course. A module (course settings, topics etc.) separator corresponding to the activities grouping is displayed with its title, underneath you can see it available for translation.
Note that: for now, the naming of the instances as well ads the fields are the DB ones, it will soon be replaced by the one used in Moodle's course layout for a better usability.
You can install a tour guide to simplify your translators' trainings.
See moodle's instructions here : User tours
Activities/resources with conplex sub content may not all work. Book does, but wiki only the first page. We planed to parse recursively the wiki pages but somehow not sure it is worse the effort as wiki content is very dynamic and mainly user ("Student") generated. We'll gladly take enhancement request based on usecases, please feel free to raise an issue.
At this time, Course Translator does not have the ability to translate advanced usage of mlang in content. For example, this includes the use of multiple mlang tags spread throughout content that utilize the same language._
Note: Still you can add untranslated content, after a first insertion of mlang tags, before and/or after, the parser should then leave them in place.
Currently images are only displayed in the preview but not in the text editor. Instead, the alt attribute content is highlighted. The Alt attribute is not sent toi ©Deepl. This should be added in further improvement for better accessibility.
This plugin has been tested on Moodle 3.11 and Moodle 4.0. Should work with the following editors:
It uses the default Moodle JS library and is tested with Boost and Classic. So there could be incompatibilities with other themes. Known so far :
This plugin does not translate every string on your site. It is only meant for translating courses and it uses Moodle's built in multilingual features along with {mlang}
to
translate your content. When you backup and restore courses, your translations will migrate with your content. Updating your source content will provide a "Update Needed" status
message on the course translation page.
Please submit issues here.
See the CHANGES.md documentation.
See the CONTRIBUTING.md documentation.