Had to use \DefineBibliographyExtras{english}
to get the workaround to work on my setup (Biblatex + Polyglossia).
Polyglossia, via option processing, understands Australian as a variant of English,
\setmainlanguage[variant=australian,ordinalmonthday=true]{english}
but that doesn't change anything. The variant doesn't get into Biblatex and, unfortunately, the gloss-english.ldf
language definition file sets \english@ordinalmonthday
to false (and also \if@british@locale
is false, so that \today
gets redefined as American format).
In any case, Biblatex sees english
as the polyglossia language, and so the dates in citations and references come out typeset as American format (which is default for english
).
Biblatex on its own, without polyglossia, understands Australian dates.
So: since typesetting in a language is, in the end, a set of user options or design choices, like a 'style' or a 'theme' (hyphenation patterns, the names of months and document parts, quotation marks and punctuation, page geometry), and since the Biblatex documentation thinks that Australian is a language ("known to Polyglossia"), why not make it one?
gloss-australian.ldf
, which is just gloss-english.ldf
with some minor tweaks:
\ProvidesFile{gloss-australian.ldf}[polyglossia: module for australian english]%<=== changed for australian
\PolyglossiaSetup{australian}{%<=== changed for australian
hyphennames={english,australian,american,usenglish,USenglish},%<=== changed for australian
hyphenmins={2,3},
fontsetup=true,
}
\newif\if@british@locale
\@british@localetrue %<=== changed for australian
\providebool{@british@hyphen}
\providebool{english@ordinalmonthday}
\define@boolkey{english}[english@]{ordinalmonthday}[true]{}
%% English is a special case in that \l@english is reserved for US English, so
%% we need to handle it differently
\define@key{english}{variant}{%
%needs to be reset for loop over hyphennames below:
\def\do##1{%
\xpg@ifdefined{#1}%
{\csletcs{l@english}{l@#1}\listbreak}%
{}%
}%
\ifstrequal{#1}{uk}%
{\@british@localetrue
\xpg@info{Option: english variant=british}}%
{\ifstrequal{#1}{british}%
{\@british@localetrue
\xpg@info{Option: english variant=british}}%
{\ifstrequal{#1}{us}% these patterns are the default so we don't need to reset them
{\@british@hyphenfalse\english@ordinalmonthdayfalse
\xpg@info{Option: english variant=american}}%
{\ifstrequal{#1}{american}%
{\@british@hyphenfalse\english@ordinalmonthdayfalse
\xpg@info{Option: english variant=american}}%
{\ifstrequal{#1}{usmax}%
{\@british@hyphenfalse\english@ordinalmonthdayfalse
\ifluatex\else\setkeys[xpg@setup]{english}{hyphennames={usenglishmax}}\fi
\xpg@info{Option: english variant=american (with additional patterns)}%
\xpg@ifdefined{usenglishmax}{}%
{\xpg@warning{No hyphenation patterns were loaded for "US English Max"\MessageBreak
I will use the standard patterns for US English instead}%
\adddialect\l@usenglishmax\l@english\relax}%
\gdef\english@language{\language=\l@usenglishmax}}%
{\ifstrequal{#1}{australian}%
{\@british@hyphentrue\english@ordinalmonthdaytrue %<=== changed for australian
\xpg@info{Option: english variant=australian}}%
{\ifstrequal{#1}{newzealand}%
{\@british@hyphentrue\english@ordinalmonthdayfalse
\xpg@info{Option: english variant=newzealand}}%
{\xpg@warning{Unknown English variant `#1'}}%
}}}}}}%
\if@british@locale\@british@hyphentrue\english@ordinalmonthdaytrue\fi
\if@british@hyphen
\ifluatex\else\setkeys[xpg@setup]{english}{hyphennames={ukenglish,british,UKenglish}}\fi
\xpg@ifdefined{ukenglish}{}%
{\xpg@warning{No hyphenation patterns were loaded for British English\MessageBreak
I will use the patterns for US English instead}%
\adddialect\l@ukenglish\l@english\relax}%
\gdef\english@language{\language=\l@ukenglish\xpg@set@language@luatex@ii{ukenglish}}%
\fi
% and we reset \do to its previous definition here:
\def\do##1{\setotherlanguage{#1}}%
}
\def\captionsenglish{%
\def\prefacename{Preface}%
\def\refname{References}%
\def\abstractname{Abstract}%
\def\bibname{Bibliography}%
\def\chaptername{Chapter}%
\def\appendixname{Appendix}%
\def\contentsname{Contents}%
\def\listfigurename{List of Figures}%
\def\listtablename{List of Tables}%
\def\indexname{Index}%
\def\figurename{Figure}%
\def\tablename{Table}%
\def\partname{Part}%
\def\enclname{encl}%
\def\ccname{cc}%
\def\headtoname{To}%
\def\pagename{Page}%
\def\seename{see}%
\def\alsoname{see also}%
\def\proofname{Proof}%
}
\def\dateenglish{%
\def\english@day{%
\ifenglish@ordinalmonthday
\ifcase\day\or
1st\or 2nd\or 3rd\or 4th\or 5th\or
6th\or 7th\or 8th\or 9th\or 10th\or
11th\or 12th\or 13th\or 14th\or 15th\or
16th\or 17th\or 18th\or 19th\or 20th\or
21st\or 22nd\or 23rd\or 24th\or 25th\or
26th\or 27th\or 28th\or 29th\or 30th\or
31st\fi
\else\number\day\fi}%
\def\english@month{\ifcase\month\or
January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or December\fi}%
\def\today{%
\if@british@locale
\english@day\space\english@month\space\number\year
\else
\ifenglish@ordinalmonthday%<=== inserted for australian
\english@day\space\english@month\space\number\year%<=== inserted for australian
\else%<=== inserted for australian
\english@month\space\english@day,\space\number\year
\fi%<=== inserted for australian
\fi}%
}
\endinput
MWE, language set to australian
in Polyglossia giving the DMY format in Biblatex, with datetime2
package to reset \today
back to what it should be (for the title), and csquotes
package for the quotation marks.
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@periodical{jtest,journaltitle={The Martian Chronicle},location={Mars},date={2148-03-26},}
@article{atest,author={AI Author},title={Human professor explores Olympus},crossref={jtest},pages={para 9},}
\end{filecontents*}
\documentclass[12pt]{article}
% SETTINGS
% ===================================
\newcommand\mytitle{A Title}
\newcommand\myauthorname{An Author}
\newcommand\mybibfilename{\jobname.bib}
% ===================================
\usepackage{fontspec}
\setmainfont{Noto Serif} %arbitrary font
\usepackage{polyglossia}
\setmainlanguage{australian}
\usepackage[british]{datetime2} % for date formatting of \today: put after polyglossia
\usepackage[style=british]{csquotes}
\usepackage[style=oxnotes, citereset=section,
ibidtracker=true,
sortlocale=en_AU,
scnames=true,
%annotation = true,
indexing=cite,
mincrossrefs=20,
backend=biber,
isbn=false,
%backref=true,
language=australian,
abbreviate=true,
date=long,
%babel=hyphen
%autolang=true
]{biblatex}
\addbibresource{\mybibfilename}
\title{\mytitle} % provide title info
\author{\myauthorname} % provide author info
\date{\today} % provide date
\begin{document}
\maketitle
Text\cite{atest}.
\printbibliography
\end{document}
Result:

Changing the language to english
gives the cite/bib MDY format
\setmainlanguage{english}
