Multi-Language Content (v2)
Maintained by
Iñigo Zendegi Urzelai, Iñaki Arenaza, Kepa Urzelai
This filter is a greatly simplified multi-language filter. It uses very simple non-HTML tags to mark multi-language blocks. Namely {mlang XX} {mlang} pairs, where XX is the Moodle short name for the language pack (i.e., en, fr, eu, es, es_mx, etc.)
It uses the same tags as the filter_multilangsecond plugin (to be compatible with it), but there is one difference between the two. This filter allows standalone {mlang} tags that don't require adjoining alternative language tags. This makes the filter more flexible at the cost of potentially producing empty sets of tags.
Comments
Product ratings and reviews are coming to Moodle Marketplace. Until then, existing comments remain available to read, but new posts have been disabled.
except for language pack changes, nothing has change in the code since version 2.5.0. That was published on 2024.11.27. Even if we take the language pack changes into account, version 2.5.0.2 (the latest one) was published on 2025.04.17 (nearly a year ago). And nothing has changed in the plugin since then.
I don't know what plugin version, and what Moodle version you are using, so it's difficult to diagnose what could be going on. If you are using a very recent Moodle version (that we may have not tested yet), there could have been changes in Moodle core that broke that functionality?
Saludos.
Iñaki.
https://moodle.org/mod/forum/discuss.php?d=473743
John
I'm sorry, but there is nothing that the multilang2 plugin can do about it. Filter plugins can only filter text that is sent to the user (browser, mobile app, emails), and only when asked to do so. It is the responsability of the search engine to either ignore or hide the `{mlang}`filter markers (and other filters' markers too, if relevant).
Saludos.
Iñaki.
I would like to know if it is possible to hide {mlang} in search results in Moodle 4.5.5. Thank you!
Vorrei sapere se è possibile non visualizzare gli {mlang} nei risultati delle ricerche in Moodle 4.5.5. Grazie!
Those Moodle 4.5 notification messages not applying correctly the filters are Moodle core code bugs, and there are already two issues in the Moodle Tracker working to solve them (both already have fix proposals):
https://moodle.atlassian.net/browse/MDL-85802
https://moodle.atlassian.net/browse/MDL-85684
In terms of the pop up issue - I know for example that if you use the glossary autolinking set up, the header of that doesn't currently support filters, so it may be that the message pop up also doesn't. A useful way to test this, is to apply a different filter in an item and see if that works or not. If all filters don't work, then you know it is a 'core' issue. If other filters work, but {mlang} doesn't then it is probably a plugin issue.
Can I check - within the 'manage filters' page on your site, is the Multi-Language Content (v2) filter set to 'Content and Headings' or just 'Content'. If it is just set to 'Content' then change it to 'Content and Headings' and see if that helps.
Other issue is in the file /mod/assign/classes/notification_helper.php, funcion send_due_soon_notification_to_user and this code
$stringparams = [
'firstname' => $user->firstname,
//'assignmentname' => $assignmentobj->get_instance()->name, //old code wrong
//'coursename' => $assignmentobj->get_course()->fullname, //old code wrong
'assignmentname' => format_string($assignmentobj->get_instance()->name, true, ['context' => $context]), //new code
'coursename' => format_string($assignmentobj->get_course()->fullname, true, ['context' => $context]), //new code
'duedate' => userdate($duedate),
'url' => $url,
];
but that's only for viewing purposes, in the email notification, the tags are not working, before worked in Moodle 4.1, i'm getting emails like this
Due on Tuesday, 22 July 2025, 23:59: {mlang es}Actividad preparatoria: Análisis de una negociación subóptima{mlang}{mlang pt_br}Atividade preparatória: Análise de uma negociação subótima{mlang}{mlang en}Preparatory activity: Analysis of a suboptimal negotiation{mlang}
All the due notifications and their lang tags are not working; so maybe is not a core issue, is a plugin glitch, what do you think?
a) the mlang tags are not working at all, or
b) is it just that the {mlang es} is not working, but other languages are working?
If a) then certain areas in Moodle don't support filters at all, so they won't work, and not much we can do apart from raise a ticket for someone to look into this and make filters work in that area.
If b) then first thing to check is that you have Spanish available as one of the languages in the site. If that is avaialble, then something I spotted once was the {mlang es} tags were not working within a certain context (I forget which), when other languages were working. What I found was I had to rearrange the order of the filters - effectively moving the {mlang} filter down the list until it worked.
https://moodle.org/mod/forum/discuss.php?d=467266
thanks a lot for this plugin - just one question:
Normally, a user only sees the language he/she should see.
If I use the search function however, the result shows the complete coded text, such as {mlang de}Verifizierung{mlang}{mlang en}Verification{mlang}.
Are the tags not working when using the search-function?