On Thursday 21 November 2002 3:47 am, Alexey Spiridonov wrote:
> * It's conceivable that I might even need 3 -- that begs the question of
> how I'm to display, say, both Russian and French at the same time, since
> French accented letters overlap with the Russian character set, If
> someone knows the answer, please tell me.
Hello, Alexey.
I don't think that this is possible currently; we must first move to using
unicode internally. I understand that this is planned for sometime soon...
> Therefore, I think it should be up to LyX to do spell checking in an
> intelligent manner. I see several approaches. One is to implement
> dynamic spell checking a la Word, and use that for single-pass spell
> checking as well. Here's how I would go about doing that:
Actually, it's quite easy I think. The spellchecking is controlled from
src/frontends/controllers/ControlSpellcecker.C.
ControlSpellchecker::setParams() creates an instance of aspell/ispell for the
set language of the buffer. Eg
tmp = (lyxrc.isp_use_alt_lang) ?
lyxrc.isp_alt_lang : buffer()->params.language->code();
speller_ = new PSpell(buffer()->params, tmp);
Thereafter, this class iterates over the buffer contents and passes each word
to speller_. All we'd have to do is interrogate the language of each word.
if (word's language == buffer language)
pass the word to speller_
else
create a new aspell/ispell instance for this language
and pass the word to it.
Looks like the only problems are bookkeeping ones.
Regards,
Angus