Multilanguage tags displayed in titles (Multilanguage ENG+ESP)

Multilanguage tags displayed in titles (Multilanguage ENG+ESP)

by Ignacio Pugliano -
Number of replies: 2
Hello, I'm developing a Moodle website with multilanguage support for English and Spanish.

I've installed 2 filters: Multi-language content filter and Multi-language content filter v2

It works mostly fine. Switching the site's language displays titles and content in the desired language, except when you access a Course page or activity.
When entering any class page (activity, files, quiz), the Course title and the activity title is parsed correctly so it shows the language tags.
Please see the attached screenshot.

Any idea how to work around this issue? I tried using the <span> syntax and {mlang} without success. 




As you may see, the headings are parsed properly in certain sections, but not when accessing each of these subpages.




Some info:
- Moodle version: 4.2.2
- Theme: Lambda Theme
- PHP 8.0

Average of ratings: -
In reply to Ignacio Pugliano

Re: Multilanguage tags displayed in titles (Multilanguage ENG+ESP)

by Michael Milette -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Ignacio,

I am not sure why you would need both multi-language filters. I just use the (v2) for almost a decade and it works great. Because it is a plain text tag, it often works in places that you cannot insert HTML code.

The first thing to check is to make sure that your filter is enabled for both Headings and Content.

If that doesn't fix it for you, you will need to contact the developers of the Lambda theme and ask them to fix the issue. Tell them that the output need to be passed through either the format_text or format_string functions (Moodle Output API)

I don't suggest that you fix it yourself because the fix would need to be re-applied every time you update the theme.

Best regards,

Michael Milette

Average of ratings: Useful (3)
In reply to Michael Milette

Re: Multilanguage tags displayed in titles (Multilanguage ENG+ESP)

by Ignacio Pugliano -
Hi Michael, thank you for your answer. We've managed to fix this with Javascript which is not ideal but should work.

In your experience, have you encountered this bug on course completion emails?
Whenever a student finishes the course, they'll receive an email and we're getting the course title with the language tags.
The string is coursecompletedmessage.

Example:

¡Felicitaciones!
Usted ha completado el curso {mlang en}Climate Impact Checkup Tool (CIC){mlang}{mlang es}Herramienta de monitoreo del impacto climático (MIC){mlang}.