Max Nikulin writes: >>> Every piece of code accessing this public constant must implement >>> fallback from e.g. "de-ch" (or de_CH) to "de". Or to "en" for an >>> unsupported language. >> Not necessarily. I mostly thought about some unconventional code >> that >> uses the constant for some reason unexpected to us. We do not want to >> break that. > > My point is that direct usage of `org-latex-language-alist' should be > discouraged.
I understand that org-latex-language-alist is a temporary patch waiting for something better, and is very dependent on org-latex-guess-babel-language and org-latex-guess-polyglossia-language[1], two functions that (IMHO) should be made obsolete in the future. Keep in mind that the old org-latex-babel-language-alist was more focused on the old babel ldf files, which is a limited number of languages. Polyglossia also has a rather limited number of supported languages. The ini files system is more extensive and more flexible. One can even define new "virtual" languages using \babelprovide, or write new custom ini files. With this scenario a closed list like org-latex-language-alist doesn't make much sense. I actually think that there would be no need for any ad hoc list of this type for latex, and everything should be delegated to a global language name translation system like the one Ihor is developing. I think that would be the first stone to build native Org multilingual support. [1] I think also that in this function there was an unhappy decision: using a syntax that is not from polyglossia but from babel leaves the user with little freedom of action, since polyglossia has more 'keyval' options, not only language variants. For example, this (real polyglossia code): \usepackage{polyglossia} \setmainlanguage{spanish} \setotherlanguage[numerals=arabic]{chinese} cannot be translated from (fake polyglossia code): #+language: es #+LaTeX_Header: \usepackage[chinese,AUTO]{polyglossia} -- Juan Manuel Macías https://juanmanuelmacias.com https://lunotipia.juanmanuelmacias.com https://gnutas.juanmanuelmacias.com