Content translation filter (superseded)

Filters ::: filter_fulltranslate
Maintained by Moodle HQ
The Content translation filter provided a way to quickly translate the content of Moodle courses into different languages. Please now use the new plugin as it maintains translations when the original language content is updated and has many other improvements, but works largely the same way than this plugin did! it's coming soon to the Moodle plugins database, but available now on github: https://github.com/andrewhancox/moodle-filter_translations
Latest release:
62 sites
6 fans

The filter should be placed as the first filter in the filter stack.
The filter parses and processes every piece of content including HTML texts and heading.
For each content item:
  • If the current language is English, then the original text is returned untouched.
    • Else hash the full original text as the HASHKEY to look into the translation database table.
  • If the key is found, then look for a translation in the current language.
    • If the translation exists, then return the translation text
      • Else get a translation using Google Translate API and store the result in the table, then return it.
  • Else the key was not found (it’s a new string), so create a new entry in the table, then get an automatic translation using a translate API, and store the result in the table, then return it.
In this way, the entire database table can be populated with English and other languages  simply by viewing the entire courses with the interface set to those languages.
The (undoubtedly imperfect) Google translations can be cleaned up using the Content translation manager tool.

Screenshots

Screenshot #0
Screenshot #1

Contributors

Moodle HQ (Lead maintainer)
Farhan Karmali: Author of the initial version
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Plugins bot
    Thu, 4 Feb 2021, 9:10 PM
    Approval issue created: CONTRIB-8383
  • Stéphane Poinsart
    Fri, 12 Feb 2021, 1:04 AM
    The plugin seems very interesting to help foreign students. But it would be nice to have an option to use an https://libretranslate.com/ instance in auto-hosting. I'd rather avoid telling teachers that it's google that's gonna choose the words that'll be displayed.
    I have little experience with freetranslate, but it seems to work well enough for some languages. There are some mistakes, but for example did you guess that this text was automatically translated from French to english?
  • Giridharan Dhanasekar
    Sun, 19 June 2022, 12:22 AM
    Thanks for the wonderful plugin Farhan & Moodle HQ.
    I made the following observations while testing the plugin.

    1. The plugin translates does not translate the headings of Lesson activity. But it translates the text in the content in the lesson activity.
    2. It repeats the text twice in the translation language. For Eg: When the Original text in English (en) is translated to Tamil (Ta), The page displays the translated text twice.
    3. But when the text is translated displays content only once in the translated language. It is not consistent.

    Regards
    Giri
  • Tanja B.
    Wed, 29 June 2022, 5:07 PM
    Hello, it says the new plugin is coming soon to the Moodle plugins database - when is this? I am not familiar with github. May I ask for help, please?
Please login to post comments