Moodle Multilang span tags do not work with the course heading.

Moodle Multilang span tags do not work with the course heading.

by Dnyaneshwar K -
Number of replies: 6

I have noticed that the multilang spans do not work as expected in course titles in the latest version of the theme boost in moodle 3.2. The problem is when I add the span tags, the title in both languages are displayed at the same time. I added following code in Full course name field.

<span lang="en" class="multilang">Biology</span><span lang="ar" class="multilang">مادة الاحياء</span>

I have as already stated enabled the multi-lang filter for both "Content and headings".

I have attached image for reference.

Thanks,

Dnyanesh

Attachment Course_list.PNG
Average of ratings: -
In reply to Dnyaneshwar K

Re: Moodle Multilang span tags do not work with the course heading.

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

What page is this? I am not aware of a standard page/feature in 3.2 that would generate such a list of blocks with courses. Is it generated by a custom plugin/theme?

In reply to David Mudrák

Re: Moodle Multilang span tags do not work with the course heading.

by Dnyaneshwar K -

Hello David,
Yes it is generated by a custom theme.

Thanks,
Dnyaneshwar

In reply to Dnyaneshwar K

Re: Moodle Multilang span tags do not work with the course heading.

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

In that case, you should report this bug to the theme maintainers. They do not use format_text() when displaying the text, so the filters are not applied.

Average of ratings: Useful (1)
In reply to David Mudrák

Re: Moodle Multilang span tags do not work with the course heading.

by Dnyaneshwar K -

Thanks David..!

I used format_text() when displaying text and Its working for me.

In reply to David Mudrák

Re: Moodle Multilang span tags do not work with the course heading.

by Meenakshi Dahiya -

Hi,

I have similar problem. My Moodle is also 3.2 and I am using Clean theme. 

I entered some text in "auth_instructions" in the format given here and that is also showing both the languages and not translating the content. Also, I am facing this issue on login page only. 

Can you pls help me with it.




In reply to Meenakshi Dahiya

Re: auth_instructions in multiple languages

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

The auth_instructions field works differently from elsewhere in Moodle. To provide instructions in multiple languages, you need use the language customisation feature, as described in the section 'Is this your first time here?' instructions in Managing authentication.

Average of ratings: Useful (1)