@PeterJones said in Multi-language syntax-highlighting:
not every XML-based file will use a Setting tag with the Type=“htf:jscriptexec” attribute to indicate javascript
True, but to be fair, the jscript part of the Type attribute does give a sensible starting point for language-specific formatting rules. Whether or not the feature is easy to implement this way is another story…
Given that @Blastocystis focused more on the CDATA section of the sample code, I’m guessing that (s)he was hoping for a more generic secondary language feature - one that gives users flexibility with the secondary language used. So, instead of applying a single language (the one selected in the current Language menu) to an entire document, have a Secondary Language menu that is designed to work on subsections of the document (to be marked in a specific manner). I could see this being equally complex to implement, though.
Either way, perhaps it would make more sense to use/add a feature like Bookmarks to control where secondary language formatting is applied. In other words, give users the ability to directly choose which lines they want to format in another language by clicking on the margin.