Course Translator is a local moodle plugin that provides a content translation page for courses and automatic machine translation using the DeepL Pro Translation api. Currently it can translate content two levels deep and 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:
- Fine tune your Deepl's settings.
- Select the source language.
- Select the target language.
- Select the fields to translate.
- Send to Deepl.
- Review and or amend automated translations.
- Save translations to Moodle's DB.
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/coursetranslator
and run through the database
upgrade process.
Course Translator will extend Moodle with the local/coursetranslator: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_coursetranslator_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.
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.
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.
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.
Up to date:
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.
Needs update:
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:
- Red -> This field was never translated. (no {mlang} tag found)
- Orange -> This field was translated but there were some updates made in the Database. (Needs a review)
- Green -> The filed was already translated and up to date (in the target language).
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.
- The text is not selected. No translation will occur. ( ... )
- The text is selected but not sent to Deepl yet. (hourglass)
- Translation is retrieved from Deepl and filed in the text editor. (floppy)
- Now the translator can review Deepl's work and amend the translation if necessary.
- Once happy with the content a click on the floppy button will save the text.
- Translation is saved in the database, with the {mlang} filter surrounding it. (DB icon)
To help the translator grasp the content's context the text are displayed in the order of appearance of the course and with a "MODULE" separator corresponding to the activities grouping.
You can install a tour guide to simplify your translators's trainings.
See moodle's instructions here : User tours
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._
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:
- Plaintext
- Atto
- Tiny
- Marklar
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.
- Question banks translation.
- Machine translation API abstraction to use other services than Deepl.
- Display images all times.
- Translations versioning.
Please submit issues here.
See the CHANGES.md documentation.
See the CONTRIBUTING.md documentation.