@theducks: I dont think wrapping span tags around single words is a good idea, that will create lots of markup bloat.
What is really needed is a language markup tool/plugin. You give it a list of dictionaries, then it goes through the book and matches words against all the dictionaries in the list. Every contiguous series of words matched to the same dictionary then get wrapped in span tag with the correct language.
That is basically how the language detect tool in word works, I imagine.
|