Hi Vincent. Thanks for the reply. One day I hope there would emerge a
sort of an overview of the whole code, to help the new beginners.
I'm sure that making inset by coping some other shouldn't be that hard.
But then it comes to all sorts of things that are interconnected
(translations, input encodings, spell-checking), and it gets harder to
understand them all. For example, what would need to be changed if I
just introduce \begin{otherlanguage}{xyz} \end{otherlanguage} as the
environment of the inset? This pair is not present now in LyX (but
there's a similar polyglossia pair, yes). What if I want to disable
foreign language underlining for that inset? How to tell the spell
checker that the inset is using some other language?
...
First of all, be sure that people think that a "foreign language inset"
is useful. Otherwise, it might be a waste of your time implementing
something that may not be used.
I've just tried to convince Richard on that, please take a look at
http://www.lyx.org/trac/ticket/7848.