Content translation filter

Filters ::: filter_fulltranslate
Maintained by Moodle HQ
The Content translation filter provides a way to quickly translate the content of Moodle courses into different languages.
Latest release:
42 sites
4 fans
Current versions available: 1
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.


Screenshot #0
Screenshot #1


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

Comments RSS


  • Thu, Feb 4, 2021, 9:10 PM
    Approval issue created: CONTRIB-8383
  • Fri, Feb 12, 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 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?
Please login to post comments