There is a way to know the language: at moment my QSHParser builds (optionaly) the tags DOME with position of the start of the tag. The algorithm could be like this:
on opening TextTab:
get DOME and keep it;
on user action:
find the current tag, according to the position of the cursor in text;
walk down the DOME to find the tag with language;
do something with this knowledge;
update DOME;
Of course "user action" would have to be carefully defined to avoid races. My knowledge about it is no-existent.
Anyway, I'll do some cleaning now and, perhaps end of next week, make the source public. It wont be finished (no Preferences, no Settings and others, that I don't know of...), but I will be something to play with - if somebody wanted to

.
In the meantime I had another "shoot my foot" idea. The overhead for multi language checking is considerable and it will be relatively seldom used. Sigil should keep its "one language mode", use multi checking as an option.