inserting styling in between span tags for multilang breaks it ?

inserting styling in between span tags for multilang breaks it ?

by Ravishankar Somasundaram -
Number of replies: 7
Dear moodlers,

I previously had this code


<span lang="en" class="multilang">This course is for measuring blah blah ........</span>

<span lang="ta" class="multilang">இப் பாடத்தை கொடுத்திருப்பது உங்கள் .........</span>


This worked perfectly fine

but when i inserted these


<span lang="en" class="multilang">This course is for measuring &quot;<a href="http://somelink.com"><span style="font-weight: bold;">blah blah .....</span></a></span>&quot;

<span lang="ta" class="multilang">இப் பாடத்தை &quot;<a href="http://someotherlink.com"><span style="font-weight: bold;">கொடுத்திருப்பது உங்கள் .. .. . . .</span></a>&quot; </span>



it breaks, all the text gets dumped in the screen irrespective of the language chosen.

Did i miss something ?


Average of ratings: -
In reply to Ravishankar Somasundaram

Re: inserting styling in between span tags for multilang breaks it ?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I think this is a known limitation of the multilang filter.

I don't know if anyone has ever tried to make it more sophisticated.
In reply to Tim Hunt

Re: inserting styling in between span tags for multilang breaks it ?

by Ravishankar Somasundaram -
Dear tim hunt,

Thanks for replying, nice to see you after long time.

So this is a limitation ! , so are there any other ways in which i can achieve the same result ?

Need to have multi language content with some styling and anchors applied. ?
In reply to Ravishankar Somasundaram

Re: inserting styling in between span tags for multilang breaks it ?

by Jeff Forssell -
I've always been baffled by the use of a long style span for making bold instead of a simple <b> tagging. thoughtful (That HTML tag can be styled in the pages CSS if needed)

Why don't you try that (manually adding <b> bold </b> ) rather than a "span in a span". I'm not absolutely sure it works, but I think so. Other possibilities might be to divide up the lang blocks into several grouped blocks with the filter breaking stuff in between. (Hope that is understandable without more explanation, but don't be afraid to ask.)
In reply to Jeff Forssell

Re: inserting styling in between span tags for multilang breaks it ?

by Ravishankar Somasundaram -
Dear Jeff Forssell,

thanks for replying, even i was in the same state thinking why tiny mce makes things so difficult in case of simple styling trying to use inline css.

But when we see the big picture, we would agree this is better than having numerous nested html tags to apply styling.

The problem itself was lying in the &quot;

dont know why the multilingual span breaks if this is placed inside,

And as with the nested span tags, not an issue but thanks for the reply smile
In reply to Ravishankar Somasundaram

Re: inserting styling in between span tags for multilang breaks it ?

by Jeff Forssell -
I am in no way trying to "knock" using CSS. But the thing is that even if I use <b> I can fine tune that in a CSS without any nested tags. I've seen people even create CCS classes "heading 1" without using <h1> tags and defining that in a CSS. To my mind they've missed something when they do that and unnecessarily complicate things.

Is there any "big picture" I'm missing when I persist in thinking that <b> is, at least, just as good (if not better than) as <span style="font-weight: bold;"> both of them are just describing an appearance and not separating content and layout.
Average of ratings: Useful (1)