2

I cannot get localized dates in the bibliography when using polyglossia and biblatex. Biblatex's manual says:

biblatex automatically adjusts to the main document language if babel or polyglossia is loaded

However, the following document does not produce the desired output.

%!TEX program = lualatex
\documentclass{article}

\usepackage{filecontents}
\begin{filecontents}{main.bib}
@Article{reference,
  author        = {Doe, John},
  title         = {Some title},
  journaltitle  = {Awesome Journal},
  volume        = {12},
  number        = {8},
  pages         = {1234-5678},
  date          = {2018-12-11},
}
\end{filecontents}

\usepackage{csquotes}

\usepackage{polyglossia}
\setmainlanguage[variant=british]{english}

\usepackage[language=auto]{biblatex}
\addbibresource{main.bib}

\begin{document}
Citation~\cite{reference}.

\printbibliography
\end{document}

The reference is typeset as

John Doe. “Some title”. In: Awesome Journal 12.8 (Dec. 11, 2018), pp. 1234–5678.

While I want the date as

11 Dec. 2018

What am I missing?

  • 1
    Language variant detection with polyglossia is complicated and does not quite work in biblatex (see for example tex.stackexchange.com/q/432347/35864), if you don't have a very good reason to use polyglossia I would strongly urge you to use babel where everything works as expected. (While polyglossia was intended to be a replacement for babel in XeLaTeX and LuaLaTeX in recent years development has stalled and bug reports are mounting github.com/reutenauer/polyglossia/issues - to be fair not all open issues will be bugs, while babel is again actively developed.) – moewe Dec 11 '18 at 9:35
1

As mentioned in How do we get Polyglossia language variants to work with Biblatex bibliographies?, biblatex's polyglossia interface has always been a bit shaky, in particular the detection of language variants does not work. The technical reasons for that are outlined in \DeclareLanguageMappingSuffix, inheritance, and polyglossia in biblatex. With babel language dialects work as expected.

If there is no good reason why you would need polyglossia, I strongly recommend you use babel instead. While polyglossia was intended as a replacement for babel for LuaLaTeX and XeLaTeX and has been recommended over babel for those engines in the past, I believe that the current state of the development of the packages, namely that babel is actively being developed and new features for non-European scripts are added whereas polyglossia development has been relatively slow in the past years, has made that advice obsolete. There are a few areas where polyglossia still has an edge on babel, especially with respect to non-European scripts, but that edge is slowly getting smaller. If you are only planning to write in Western European languages, there is absolutely no reason to prefer polyglossia over babel, see for example this recent comment on the texhax mailing list.

If you must use polyglossia there is a workaround, which is explicitly not recommended. You can remap the english localisation to british with

\DeclareLanguageMapping{english}{british}

To quote the biblatex documentation, p. 303

Note that \DeclareLanguageMapping is not intended to handle language variants (e.g., American English vs. British English) or babel/polyglossia language aliases (e.g., USenglish vs. american).

  • github.com/plk/biblatex/issues/845 – moewe Dec 11 '18 at 16:56
  • I found in many places that polyglossia was supposed to be a modern replacement of babel, which would not work at all with LuaLaTeX. I suppose that was outdated advice. Babel seems to work fine. I mostly write in English and other European (Latin) languages, I guess polyglossia does not bring any particular advantage to me. – Claudio Dec 11 '18 at 18:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.