Hi Ihor,

just to check.

What you mean is:

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index c6fb6b06b..f1c9d090f 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -171,6 +171,7 @@
     (:latex-toc-command nil nil org-latex-toc-command)
     (:latex-compiler "LATEX_COMPILER" nil org-latex-compiler)
     (:latex-multi-lang "LATEX_MULTI_LANG" nil org-latex-multi-lang-driver)
+    (:languages "LANGUAGE" nil (list org-export-default-language) split)
     ;; Redefine regular options.
     (:date "DATE" nil "\\today" parse)))

diff --git a/lisp/ox.el b/lisp/ox.el
index d95e031e8..36716dfc7 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -3099,6 +3099,10 @@ still inferior to file-local settings."
                        (append (org-export-get-all-options backend)
                                org-export-options-alist))))
         tree modified-tick)
+    ;; Get :languages and insert it into :language
+    (when-let* ((languages (plist-get info :languages))
+                (lang (nth 0 languages)))
+      (setq info (plist-put info :language lang)))
     ;; Run first hook with current backend's name as argument.
     (run-hook-with-args 'org-export-before-processing-hook
                         (org-export-backend-name backend))

And then, of course, use :languages in ox-latex.el

Right?

Best, /PA

On Tue, 1 Jul 2025 at 07:28, Pedro Andres Aranda Gutierrez
<paag...@gmail.com> wrote:
>
> On Mon, 30 Jun 2025 at 19:34, Ihor Radchenko <yanta...@posteo.net> wrote:
> >
> > Pedro Andres Aranda Gutierrez <paag...@gmail.com> writes:
> >
> > >> >> Also, since we now allow multiple languages to be listed in 
> > >> >> #+LANGUAGE,
> > >> >> we may need to update the manual when talking about #+LANGUAGE keyword
> > >> >> in other places as well; not just in latex export section.
> > >> You seemingly did not address this comment.
> > >
> > > I've gone through the code once again and I think we need to start
> > > looking at places where #+LANGUAGE is used outside the LaTeX exporter.
> > > There we will need to filter out and keep the first language if we
> > > find a comma separated list of languages...
> > >
> > > WDYT?
> >
> > 1. It will be better to use space instead of comma. Then, we will be
> >    able to use "split" directive in `org-export-options-alist'
> > 2. We will probably need to do some backwards compatibility refactoring,
> >    making sure that no extra package using :language is broken.
> >    Preliminary, I am thinking of the following approach:
> >    (i) We introduce a new :languages export option
> >        (:languages "LANGUAGE" nil (list org-export-default-language) split)
> If I get you right, :languages will be an array, right?
> >    (ii) We introduce pre-processing into `org-export--annotate-info'
> >         extracting the first language from :languages property into
> >         :language. That way, everything relying on :language value being
> >         a single string, will remain operational. Newer code can then
> >         use :languages directly.
> >
> > WDYT?
> My concern is the impact it might have for other backends...
>
> Let's go through a use case:
>
> Say you have an Org document you want to export to PDF and HTML from Org.
> Your Web page needs to be in Italian, and you want to have ancient
> Greek text on it.
> To produce the PDF, you intend to use =polyglossia=.
>
> What would be the approach?
>
> Thx, /PA
> >
> > --
> > Ihor Radchenko // yantar92,
> > Org mode maintainer,
> > Learn more about Org mode at <https://orgmode.org/>.
> > Support Org development at <https://liberapay.com/org-mode>,
> > or support my work at <https://liberapay.com/yantar92>
>
>
>
> --
> Fragen sind nicht da, um beantwortet zu werden,
> Fragen sind da um gestellt zu werden
> Georg Kreisler
>
> Sagen's Paradeiser, write BE!
> Year 1 of the New Koprocracy



-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Sagen's Paradeiser, write BE!
Year 1 of the New Koprocracy

Reply via email to