On Fri, Apr 10, 2026 at 08:04:03PM +0200, Patrice Dumas wrote: > On Fri, Apr 10, 2026 at 05:18:34PM +0100, Gavin Smith wrote: > > Again, what you might think as basic string processing may be hard to > > implement > > in TeX, so please avoid allowing elaborate arguments to @documentlanguage > > other > > than what is currently supported (it wasn't clear to me from your message > > whether you were proposing to use such "BCP 47" locale names as arguments to > > @documentlanguage or not). > > No, I am not proposing to use "BCP 47" locale names as arguments to > @documentlanguage, but generate "BCP 47" locale names based on > @documentlanguage and @documentscript. > > "BCP 47" locale names are used for xml:lang, HTML lang and LaTeX babel > language names.
OK, no problem with using it internally in texinfo.tex. > These names could be used too in Texinfo TeX to specify the txi-*.tex > file names like txi-xx-Latn.tex used for a @documentlanguage/@documentscript > combination, when @documentscript is specified. It's a moot point at present, as we don't have any translations in multiple alphabets. In the case of Serbian, we don't even support Cyrillic fonts in texinfo.tex. (At some point there was a "cyrtexinfo" format, which is mentioned here: https://ctan.org/tex-archive/macros/latex/contrib/t2/cyrplain. This may have been used for Texinfo manuals in Russian in the past. Hence, I'm optimistic, that were there a need to implement support for the Cyrillic alphabet, there would be appropriate fonts that we could reference.) "@documentlanguage sr" loads txi-sr.tex straight away, so I think it would make sense, were a Serbian translation in the Cyrillic alphabet to be available, that "txi-sr.tex" would contain translations in both alphabets, and a following "@documentscript" line would switch to one of them.
