Languages in the aux file?

[email protected] (Thomas M. Widmann) 16 Apr 2003 21:07:25 +0100
Newsgroups gmane.comp.tex.bibulus.devel
Message-ID <[email protected]>
Hi,

the Babel package seems to write stuff like the following into the aux
file:

\select@language{british}
\@writefile{toc}{\select@language{british}}
\@writefile{lof}{\select@language{british}}
\@writefile{lot}{\select@language{british}}

But if several \selectlanguage statements are issued, this will be
repeated.  For instance, the following LaTeX input:
%...
\usepackage[danish,british]{babel}
%...
Hello.
{\selectlanguage{danish}Hej}
\bibliography{test}
%...

produces the following on my machine:

\relax 
\catcode`"\active
\bibdata{test}
\select@language{british}
\@writefile{toc}{\select@language{british}}
\@writefile{lof}{\select@language{british}}
\@writefile{lot}{\select@language{british}}
\select@language{danish}
\@writefile{toc}{\select@language{danish}}
\@writefile{lof}{\select@language{danish}}
\@writefile{lot}{\select@language{danish}}
\select@language{british}
\@writefile{toc}{\select@language{british}}
\@writefile{lof}{\select@language{british}}
\@writefile{lot}{\select@language{british}}

My question is now: How can one find out -- by analysing the aux file
-- what the main document language is, and what language was active
when the \bibliography command was issued?

Bibulus obviously needs to know this to produce bibliographies in the
right language.

/Thomas
-- 
\author{Thomas Widmann\thanks{3/2,  54 Mavisbank Gardens,  Glasgow  G51\,1HL,
Scotland, EU\@. Tel.~+44 (141) 419\,9872.}\\{\tt [email protected]}}