The correct way to do it is to mark text in different languages. That allows people reading the book in the future to, for example, lookup words in the dictionary of the marked language while reading.
However, if you want to automate just spell cehcking you can do so using a search replace function mode function (but you need to be able to program a bit for that).
The idea would be similar to
https://manual.calibre-ebook.com/fun...phenated-words
Here when the word is not recognized by the main dictionary you wrap it ina <span lang="secondary language">word</span>
Then re-run spell check. Now words reported misspelled will have failed to match in both languages. Fix all the words that need fixing and then when you are done, run a search and replace to remove the inserted span tags.