xml:lang (or actually just lang in modern html) sets the language for the contents of the tag it appears on, *and that is all*. Not the whole book, or even not the whole html file (assuming the tag is not the root <html> tag). And spellcheck respects that, as it is supposed to. That has *nothing* to do with what the overall language for the book is.
|