Selon Enrico Forestieri <[EMAIL PROTECTED]>:

> > IMHO, that's not exactly what one would expect. One should expect that the
> > labels would always be consistent with output. Hence they should always be
> > translated to the _current_ language, not the document language.
>
> Nonetheless, I find it very weird that changing the language of the first
> character causes the translation of the label, too.

Agreed. But that's only because changing the language of the first character
causes a "\selectlanguage{english}" code to be inserted before the "\chapter"
command (so the current language into the '\chapter' command is english).

The bug is that if one selects only a part of the title, only this part should
be affected (i.e. with a '\foreignlanguage' command).

> If I cannot select
> the language of the label alone, then it should be translated to the
> document language irrespective of the language of what follows, IMO.
> Another algorithm could be this one: if all of the title is in a given
> language, then use that language for the label, too. Otherwise, if there
> is more than one language switch, use the document language for translating
> the label.

I agree, but again, not the document language, the current language. You could
have a whole document portion using a foreign language (including chapters,
sections...).

> > ... and it seems that it's already the case with JMarcs patches.
>
> No, it only works for Part, Chapter and alike. Try it with TOC, for
> example. If you change the language of the TOC inset, it is translated
> to the document language on screen, but you get a different result in
> output.

True. I didn't see that before. JMarc mentioned in this thread that real time
translation will be fixed later for TOC & Co (1.6), but this is a bug since
after reopening, the problem persists (see attached file, inconsistency between
label and output for the toc list).

> > AFAIU, the
> > problem comes from the fact that one cannot easily specify the place from
> where
> > the foreign language should start (see my previous msg with code samples).

In order to specify only the first character as foreign language we currently
have to use an ERT (see attached file). If implemented, the above algorithm
would solve this.

Mael.

Attachment: multi-lang.lyx
Description: Binary data

Reply via email to