maths / moodle-qtype_stack

Stack question type for Moodle
GNU General Public License v3.0
138 stars 147 forks source link

Update Languages.md #1203

Closed anst-i closed 3 weeks ago

anst-i commented 3 weeks ago

Added instructions how to avoid issue #940 to the Language documentation.

sangwinc commented 3 weeks ago

Thanks @anst-i that's really helpful. We should probably improve the filter....

aharjula commented 3 weeks ago

Well, someone should, not us though... But it seems like people are moving towards multilang2 from that original one. It just is not worth the effort to fight that filters parser, when it still would be finicky when working with things that may generate spans...

And STACK itself moved away by building our own internal one so that it can be used in places that do not ever see the Moodle filters. Basically, if one wants to mix STACK-JS with localisation one cannot use any of those Moodle language filters inside those, only [[lang code="XY"]]...[[/lang]] works over there, Given that [[jsxgraph]]-content, is STACK-JS content, and often has some localised labels that really has some uses.

Naturally, it is annoying to have to use different syntax for this in different places, but if one really wants to use only one, I would go for multilang2. It works in most places within STACK but will not and never will work for STACK-JS containers.

anst-i commented 3 weeks ago

I have noticed another bug in the multilang filter, so another solution would be welcome. It appears the multilang filter does not parse the content of the <span lang=".." class="multilang"> tag properly and simply goes for the first </span> it can find, meaning you can't use <span> in multilang for styling.