[Tex/LaTex] Main text and bibliography in two languages but with alternate date format

babelbiblatexlanguages

I'm writing a text in American English and German (new orthography), so I use \usepackage[ngerman,USenglish]{babel}. The biblatex bibliography also contains English and German references. I need the hyphenation rules of each language in the bibliography, so I use \usepackage[backend=biber,language=autobib,autolang=hyphen]{biblatex} and then specify the language of individual bibliography entries like this: langid = {ngerman}.

I would like all of the dates, however, to be in Australian format (dd Mon. YYYY). How can I get this date format (especially in the bibliography)?

(If I didn't need German hyphenation rules in the bibliography, I'd simply remove autolang and langid and use\usepackage[backend=biber,language=australian{biblatex}, although this would change the style of hyphenation, quotations, commas, etc. in the bibliography to australian style, too.)

Best Answer

I don't know an easy way to make all dates in the entire document follow the Australian format, but I know how to apply the Australian date format to the bibliography without affecting the hyphenation style.

You can add australian to babel and then switch the language to australian before printing the bibliography. Then all the dates in the bibliography will be Australian-style.

Be aware that this solution also affects other style factors within the bibliography such as serial commas (as described here) and quotation mark formatting. For example, references to articles printed in USenglish format use double quotes and keep end punctuation inside the quotes, while those printed in australian format use single quotes and keep the end punctuation outside the quotes:

"Article Title in American English."
'Article Title in Australian English'.

The following code exemplifies the result:

\documentclass{article}
\usepackage[ngerman,australian,USenglish]{babel}
\usepackage[autostyle]{csquotes}
\usepackage[backend=biber,language=autobib,autolang=hyphen,sorting=none]{biblatex}
\addbibresource{testbib.bib}

\begin{filecontents}{testbib.bib}
@article{default2014,
  author = {Vorname Nachname},
  title = {The German Rindfleischetikettierungs\"uberwachungsaufgaben\"ubertragungsgesetz},
  journaltitle = {Default Journal of Gastroenterology},
  date = {2014-03-20},
}
@article{au2014,
  author = {Vorname Nachname},
  title = {The German Rindfleischetikettierungs\"uberwachungsaufgaben\"ubertragungsgesetz},
  journaltitle = {Australian Journal of Gastroenterology},
  date = {2014-03-20},
  langid = {australian},
}
@article{us2014,
  author = {Vorname Nachname},
  title = {The German Rindfleischetikettierungs\"uberwachungsaufgaben\"ubertragungsgesetz},
  journaltitle = {American Journal of Gastroenterology},
  date = {2014-03-20},
  langid = {USenglish},
}
@article{de2014,
  author = {Vorname Nachname},
  title = {Das deutsche Rindfleischetikettierungs\"uberwachungsaufgaben\"ubertragungsgesetz},
  journaltitle = {Zeitschrift f\"ur Gastroenterologie},
  date = {2014-03-20},
  langid = {ngerman},
}
\end{filecontents}

\begin{document}
% main text here in USenglish (switch to ngerman when necessary)
The hyphenation rules of Australian English, American English, and German are\
different~\cite{default2014,au2014,us2014,de2014}.

\selectlanguage{australian} % for proper day/month order
\printbibliography
\end{document}

The English-language entry follows English hyphenation rules. The German-language entry follows German hyphenation rules. Both entries follow the Australian date format.

When the langid field is omitted, the hyphenation style defaults to that of the currently-selected language (in this example, australian).

Related Question