Multilang tags do not work with the course heading

Multilang tags do not work with the course heading

by Saeed Amiri -
Number of replies: 11

Hi

I had earlier posted about my problem in some other forum but I did not receive any answers so I decided to post it here (as I thought it is related to my problem). 

The problem is when I create the a course and insert the multilang span tags such the following example

<span lang="EN” class="multilang">content</span><span lang="FA” class="multilang">محتوا</span>

in the "Course full nameRequired field", I have both languages displayed as the heading of the course page as in below.

multilang


Would any one be so kind as to help me solve this problem?

By the way, I am using the latest version of moodle and theme essential and have enabled the multilang support for both content and heading in moodle.

Many thanks.

Average of ratings: -
In reply to Saeed Amiri

Re: Multilang tags do not work with the course heading

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

I see that you have used capital letters for the lang span tag. It should be in lowercase letters like this...

<span lang="en" class="multilang"> 

 

In reply to Mary Evans

Re: Multilang tags do not work with the course heading

by Robert Brenstein -
Also, watch that all quotes are simple not curly (like your closing quotes in the post). Stray invisible characters may also break the syntax.
In reply to Robert Brenstein

Re: Multilang tags do not work with the course heading

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

I don't see any curly braces in Saeed's post...or am I missing some thing?

In reply to Saeed Amiri

Re: Multilang tags do not work with the course heading

by Saeed Amiri -
@ Mary and Robert Hi, thanks for replying. 


Unfortunately, using lowercase letters did not work either and the quotes are simple. I also need to mention that the titles of the listed courses on the frontpage work as expected (i.e only the title of the relevant language shows up). The problem is the coursetitle when I open the course itself. Another thing I noticed is that I do not have such a problem when I use Moodle's default theme, that is "Clean". 


 Thanks again 

 Saeed

In reply to Saeed Amiri

Re: Multilang tags do not work with the course heading

by Saeed Amiri -

Update:

I also noticed that the older version of theme essential does not have this problem as it does not show the title of the course at all (upon being opened):

old-essential


while in the latest version we have


new essential


Am I right in assuming that the problem is related to the theme rather than a being a Moodle bug? 

In reply to Saeed Amiri

Re: Multilang tags do not work with the course heading

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

It is looking very much like it is a theme problem, in which case you need to report this as a new issue here...

https://github.com/DBezemer/moodle-theme_essential/issues

you can mention this discussion thread too which will be helpful to David and Gareth when trouble shooting.

cheers

Mary

Average of ratings: Useful (1)
In reply to Mary Evans

Re: Multilang tags do not work with the course heading

by Saeed Amiri -

Thanks Mary. I will.

In reply to Saeed Amiri

Re: Multilang tags do not work with the course heading

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Ok, I have raised: https://github.com/DBezemer/moodle-theme_essential/issues/293

But I cannot get course titles to work with the multi-lang filter.  I don't think this is supported by core:  https://docs.moodle.org/19/en/Multi_language_content#Course_summary_and_title_tags which lead to: https://docs.moodle.org/23/en/Filter_settings and specifically "'Apply to' setting in Manage filters" which I have set to 'Content and headings' and the 'Course full name*' field in the course settings removes the multi-lang html.

I've tested in Essential and Clean to the same effect.

In reply to Gareth J Barnard

Re: Multilang tags do not work with the course heading

by Robert Brenstein -
To quote from the doc you linked: At least from 1.8.2 long course titles and site name, both full and breadcrumb were multilang filtered.

The OP does not state which version of Moodle is involved. May be there is a glitch, although he seemed to have determined that the problem is somehow theme related.
In reply to Robert Brenstein

Re: Multilang tags do not work with the course heading

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Well, every time I type in multi-lang HTML into the 'Course fullname*' field of the course settings it is removed.