Closed anst-i closed 5 months ago
Thanks @anst-i that's really helpful. We should probably improve the filter....
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.
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.
Added instructions how to avoid issue #940 to the Language documentation.